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

3.0.19: Build error on armel, mips, mipsel due to atomics #2828

Closed
bernhardschmidt opened this issue Aug 1, 2019 · 5 comments
Closed

3.0.19: Build error on armel, mips, mipsel due to atomics #2828

bernhardschmidt opened this issue Aug 1, 2019 · 5 comments

Comments

@bernhardschmidt
Copy link

Issue type

  • Defect - Unexpected behaviour (obvious or verified by project member).

Defect

How to reproduce the issue

Upgrading the FreeRADIUS packaging inside Debian from 3.0.17 to 3.0.19 leads to compilation errors on five architectures. All of them built fine with 3.0.17.

It seems to be related to the use of atomics, which as far as I can see has been introduced in 3.0.18. I know there are some issues on these platforms. I don't have enough experience to fix this.

https://buildd.debian.org/status/package.php?p=freeradius

The error is always the same, in different modules.

LINK build/lib/rlm_pam.la
build/make/jlibtool --silent --mode=link gcc -o build/lib/rlm_pam.la -rpath /usr/lib/freeradius   -Wl,-z,relro -Wl,-z,now   build/objs/src/modules/rlm_pam/rlm_pam.lo  -lpam -ldl 
/usr/bin/ld: build/lib/.libs/libfreeradius-radius.so: undefined reference to `__atomic_compare_exchange_8'
/usr/bin/ld: build/lib/.libs/libfreeradius-radius.so: undefined reference to `__atomic_load_8'
/usr/bin/ld: build/lib/.libs/libfreeradius-radius.so: undefined reference to `__atomic_store_8'
@alandekok
Copy link
Member

Please check if the patch fixes it. If so, we will release 3.0.20 soon with the patch.

@bernhardschmidt
Copy link
Author

Thanks for the quick fix.

A test build with your patch attached on armel worked fine. I have just uploaded a new version 3.0.19+dfsg-2 with that patch included into Debian. Within the next 12-24h it should have attempted to build on all architectures.

https://buildd.debian.org/status/package.php?p=freeradius

I will get back to you with results ASAP

@bernhardschmidt
Copy link
Author

3.0.19+patch has built fine on all architectures, thanks

@akschu
Copy link

akschu commented Nov 15, 2019

I'm not sure why, but this patch (or 3.0.20) on slackware causes the resulting binary to link against libatomic.so.1 which is part of the gcc-5.5.0 package. As I don't like to have a compiler on my radius server, I applied this patch with -R and was able to compile 3.0.20 fine without needing to link against libatomic. So while this fixes the debian build issue, it also causes an unwanted dependancy on another linux.

@alandekok
Copy link
Member

@akschu If the server is linking to libatomic, then the solution is to install libatomic. That library is used by gcc, but should also be installable via another package.

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

No branches or pull requests

3 participants