https://bugs.winehq.org/show_bug.cgi?id=39696
Bug ID: 39696 Summary: -fPIC compile option required Product: Wine Version: 1.8-rc2 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: blake1024@gmail.com Distribution: ---
When I built my app in 64 bit mode it wouldn't link. It said:
winegcc -g -o main main.o main.res ../../lib/wds.a ../../lib/dynace.a -lkernel -luser -lgdi -lcomdlg -lcomctl -ladvapi -lshell -lmpr -lwine -lmsvcrt -lmsimg -lm /usr/bin/ld: ../../lib/dynace.a(Object.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC ../../lib/dynace.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status winegcc: gcc failed
I tried recompiling everything with -fPIC and the link then succeeded. If 64 bit WINE apps require -fPIC then the docs should be very clear about it.
Thanks.
Blake McBride
https://bugs.winehq.org/show_bug.cgi?id=39696
Blake McBride blake1024@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |blake1024@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=39696
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #1 from Sebastian Lackner sebastian@fds-team.de --- Wines ./configure script should automatically add -fPIC to the CFLAGS. Please provide more details how exactly you tried to build it, and which host environment you have (OS, distribution, ...).
https://bugs.winehq.org/show_bug.cgi?id=39696
--- Comment #2 from Blake McBride blake1024@gmail.com --- Yes, it did auto-add the -fPIC to the _WINE_ build. That didn't affect my application build. I was unaware that my application had to be built with -fPIC. What I was suggesting is making it very clear that any apps built in 64 bits must use -fPIC.
https://bugs.winehq.org/show_bug.cgi?id=39696
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Did you use winegcc when building your library?
https://bugs.winehq.org/show_bug.cgi?id=39696
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=39696
--- Comment #4 from Austin English austinenglish@gmail.com --- (In reply to Sebastian Lackner from comment #1)
Please provide more details how exactly you tried to build it, and which host environment you have (OS, distribution, ...).
Where/how should this warning occur?
https://bugs.winehq.org/show_bug.cgi?id=39696
--- Comment #5 from Blake McBride blake1024@gmail.com --- I think the readme file should make clear the-fPIC requirement as well as the need for Win32 in order for Win64 to run.
https://bugs.winehq.org/show_bug.cgi?id=39696
--- Comment #6 from Austin English austinenglish@gmail.com --- It's still not clear if you used winegcc to build your library as Alexandre asked in comment #3
https://bugs.winehq.org/show_bug.cgi?id=39696
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |dark.shadow4@web.de Status|UNCONFIRMED |NEEDINFO
--- Comment #7 from Fabian Maurer dark.shadow4@web.de --- Any update on this?
https://bugs.winehq.org/show_bug.cgi?id=39696
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #8 from joaopa jeremielapuree@yahoo.fr --- No news from the OP since 5 years. Can an administrator close this bug as ABANDONED?
https://bugs.winehq.org/show_bug.cgi?id=39696
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |ABANDONED Status|NEEDINFO |CLOSED CC| |z.figura12@gmail.com
--- Comment #9 from Zebediah Figura z.figura12@gmail.com --- Closing abandoned.