Issue Details (XML | Word | Printable)

Key: FL-2711
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: António Meireles [aka doniphon]
Reporter: Adam Chasen
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Foresight Linux

lvm2 fails to compile with new gcc

Created: 18/Feb/11 05:10 PM   Updated: 12/Jan/13 09:26 PM
Component/s: None
Affects Version/s: 2.1.2
Fix Version/s: None
Security Level: Public (Everyone can see this issue)

Time Tracking:
Not Specified

File Attachments: 1. Text File lvm2-2.02.72-conflict.patch (3 kB)
2. File lvm2.recipe (5 kB)

 Description  « Hide
The new gcc makes lvm2 fail to compile with:
gcc -O2 -g -D_FORTIFY_SOURCE=2 -fstack-protector -O2 -g -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -O2 -O2 -g -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -O2 -g -O1  -g -O1  -Wl,--export-dynamic -L./libdm -L./lib -L./daemons/dmeventd -g -O1  -Wl,--export-dynamic -L../libdm -L../lib -L../daemons/dmeventd -static -L../libdm/ioctl \
              -o dmsetup.static dmsetup.o -ldevmapper   -lm  
/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib64/gcc/x86_64-unknown-linux/4.4.4/../../../../lib64/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie
collect2: ld returned 1 exit status

of course if I disable the static building flag, it succeeds. I don't really understand enough to resolve this issue.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order

Adam Chasen added a comment - 19/Feb/11 12:52 AM
attached working recipe (also with clvmd on)

Adam Chasen added a comment - 23/Feb/11 07:50 AM
I have this working

Adam Chasen added a comment - 23/Feb/11 10:34 AM
lvm2:source=/[is: x86(~cmov,~i486,~i586,~i686,~mmx,~nx,~sse,~sse2)]{x86} ->
device-mapper=/[is: x86]
lvm2=/[is: x86]

lvm2:source=/[is: x86_64(~3dnow,~3dnowext,~nx)]{x86_64} ->
device-mapper=/[is: x86_64]
lvm2=/[is: x86_64]

+ Updating /tmp/lvm2 after commit

António Meireles [aka doniphon] added a comment - 12/Sep/11 04:59 AM

the patch you have actually works. the trick is that since it touches one just needs to call autoreconf -fi before calling configure (as configure files need to be regenerated)

António Meireles [aka doniphon] added a comment - 12/Sep/11 06:12 AM

Can you build/test locally lvm2:source=/ ?
(it needs for build/run and which will land in 2-devel groups in next few hours)