Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.2.10 fail to buil on arm and i686 #5483

Closed
Erick555 opened this issue Jan 17, 2019 · 5 comments
Closed

2.2.10 fail to buil on arm and i686 #5483

Erick555 opened this issue Jan 17, 2019 · 5 comments

Comments

@Erick555
Copy link

Hello again,

W noticed that cups 2.2.10 fails to build on arm and i686 arches (x86-64 and aarch64 work good) in linux with the following error:

hash.c:238:13: error: conversion to ‘ssize_t’ {aka ‘int’} from ‘unsigned int’ may change the sign of the result [-Werror=sign-conversion]
             return (gnutls_hash_get_len(alg));
                    ~^~~~~~~~~~~~~~~~~~~~~~~~~

Build config:

    CFLAGS: -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions
      -fstack-protector-strong -grecord-gcc-switches
    CXXFLAGS: -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions
      -fstack-protector-strong -grecord-gcc-switches
    HOME: /tmp
    LC_ALL: en_US.UTF-8
    LDFLAGS: -Wl,-z,relro,-z,now -Wl,--as-needed
    LOGNAME: tomjon
    LT_SYS_LIBRARY_PATH: /usr/lib/arm-linux-gnueabihf
    MAKEFLAGS: -j8
    PATH: /usr/bin:/bin:/usr/sbin:/sbin
    PYTHON: /usr/bin/python3
    PYTHONHASHSEED: '0'
    SHELL: /bin/sh
    SOURCE_DATE_EPOCH: '1320937200'
    TERM: dumb
    TZ: UTC
    V: '1'


    configure --prefix=/usr \
    --exec-prefix=/usr \
    --bindir=/usr/bin \
    --sbindir=/usr/bin \
    --sysconfdir=/etc \
    --datadir=/usr/share \
    --includedir=/usr/include \
    --libdir=/usr/lib/arm-linux-gnueabihf \
    --libexecdir=/usr/libexec \
    --localstatedir=/var \
    --sharedstatedir=/usr/com \
    --mandir=/usr/share/man \
    --infodir=/usr/share/info  --enable-deterministic-archives \
    --enable-shared \
    --disable-static \
    --build=arm-unknown-linux-gnueabihf \
    --host=arm-unknown-linux-gnueabihf --enable-debug \
    --with-components=core \
    --with-dbusdir=/etc/dbus-1 \
    --disable-systemd \
    --enable-threads \
    --enable-gnutls \
    localedir=/usr/share/locale \
    DSOFLAGS="$CFLAGS $LDFLAGS"

Full build log from arm

In debian build and fedora build there seem to be the same warning but the build continues. Do you have any ideas?

@michaelrsweet
Copy link
Collaborator

Yes, GNU TLS needs to settle on return types for their APIs. The "fix" will be to add a cast to the affected call to gnutls_hash_get_len.

@Erick555
Copy link
Author

The thing which breaks the build for us is that we build cups using git as source, not tarballs and cups treats them as devel ones and makes errors fatal:

if test -d .git; then

Is it possible to introduce some --devel configure flag instead treating all builds from git as devel ones?

@michaelrsweet
Copy link
Collaborator

I hesitate to introduce changes like this since we want warnings as errors when we build from Git sources. Better to address the warning than let it go on...

@Erick555
Copy link
Author

Erick555 commented Jan 18, 2019

Sure, it's better to address it however all linux distros simply ignored it because they don't build from git which means all the burden goes for those who do 😄 .

@michaelrsweet
Copy link
Collaborator

[master 0057f14] Fix compile error on Linux (Issue #5483)

[branch-2.2 328d863] Fix compile error on Linux (Issue #5483)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants