Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 667864 - dev-libs/libsodium-1.0.16-r2 fails to build on i686 that has no cpu sse2 flag.
Summary: dev-libs/libsodium-1.0.16-r2 fails to build on i686 that has no cpu sse2 flag.
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-06 07:19 UTC by Ted Marston
Modified: 2018-10-10 17:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/proc/cpuinfo (cpuinfo,567 bytes, text/plain)
2018-10-06 07:19 UTC, Ted Marston
Details
Build log (build.log,374.48 KB, text/plain)
2018-10-06 07:32 UTC, Ted Marston
Details
emerge --info =dev-libs/libsodium-1.0.16-r2 (emerge.info,6.78 KB, application/x-info)
2018-10-06 07:40 UTC, Ted Marston
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ted Marston 2018-10-06 07:19:48 UTC
Created attachment 549488 [details]
/proc/cpuinfo

dev-libs/libsodium-1.0.16-r2 fails to build on i686 with no sse2 cpu-flag.
The configure script claims to test for this flag but fails to notice that the cpu does not offer an sse2 instruction set.
Comment 1 Ted Marston 2018-10-06 07:32:12 UTC
Created attachment 549490 [details]
Build log
Comment 2 Ted Marston 2018-10-06 07:40:06 UTC
Created attachment 549492 [details]
emerge --info =dev-libs/libsodium-1.0.16-r2
Comment 3 Ted Marston 2018-10-06 07:48:20 UTC
I set the CFLAGS in my /etc/portage/make.conf to detail the missing flags
a while ago to get around a similar problem building some qt software, but
this time the compile line for the offending file in libsodium-1.0.16-r2
are ... -msse2 -march=i686 -mno-sse2 ... so I guess -msse2 takes priority.
Comment 4 Ted Marston 2018-10-06 15:45:00 UTC
I have now successfully built libsodium-1.0.16-r2 after restoring the CFLAGS
in /etc/portage/make.conf to CFLAGS="-march=native -O2 -pipe". However the
configure script still claims that the processor accepts -msse2 , together 
with a load of other cpu-flags that the processor does not support. How can I
test whether this library will function correctly now?
Comment 5 Matt Turner gentoo-dev 2018-10-07 01:30:04 UTC
You are passing -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-avx in CFLAGS.

There's no need for that since -march=i686 doesn't enable any of those instruction sets.

It will only cause problems like this. libsodium isn't my package so I won't make the call, but I have resolved bugs like this as INVALID in the past.
Comment 6 Matt Turner gentoo-dev 2018-10-10 17:54:04 UTC
Oh, I didn't realize this package has no maintainer. In that case, yeah, just remove those CFLAGS and don't shoot yourself in the foot.