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
Operations

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=/foresight.rpath.org@fl:2-devel//2-devel//rmake-repos.eng.rpath.com@local:2-devel/2.02.84-0.4.1[is: x86(~cmov,~i486,~i586,~i686,~mmx,~nx,~sse,~sse2)]{x86} ->
device-mapper=/foresight.rpath.org@fl:2-devel//2-devel/2.02.84-0.5-1[is: x86]
lvm2=/foresight.rpath.org@fl:2-devel//2-devel/2.02.84-0.5-1[is: x86]

lvm2:source=/foresight.rpath.org@fl:2-devel//2-devel//rmake-repos.eng.rpath.com@local:2-devel/2.02.84-0.4.1[is: x86_64(~3dnow,~3dnowext,~nx)]{x86_64} ->
device-mapper=/foresight.rpath.org@fl:2-devel//2-devel/2.02.84-0.5-1[is: x86_64]
lvm2=/foresight.rpath.org@fl:2-devel//2-devel/2.02.84-0.5-1[is: x86_64]
lvm2:source=/foresight.rpath.org@fl:2-devel//2-devel/2.02.84-0.5[]

+ Updating /tmp/lvm2 after commit


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

the patch you have actually works. the trick is that since it touches configure.in 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
Adam,

Can you build/test locally lvm2:source=/foresight.rpath.org@fl:2-devel/2.02.84-3 ?
(it needs for build/run http://lists.rpath.org/pipermail/foresight-commits/2011-September/050206.html and http://lists.rpath.org/pipermail/foresight-commits/2011-September/050210.html which will land in 2-devel groups in next few hours)