[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.cdt] Linker Error on OpenSolaris 2009.06
|
- From: Dann Martens <dann@xxxxxxxxxxx>
- Date: Thu, 13 Aug 2009 16:26:00 +0200
- Newsgroups: eclipse.tools.cdt
- Organization: tomoton NV/SA
- User-agent: Thunderbird 2.0.0.22 (Windows/20090605)
Hi,
I've been trying to use the CDT to quick-port the ECF IPC component to
Solaris, starting from the Linux sources and build directives.
Using OpenSolaris 2009.06 (on x86), I've installed Eclipse 3.4 Ganymede
(using the O/S package manager), and the CDT 5.0.2 (using the update site).
I configured the right include paths.
Using the default C/C++ project settings, building the shared library fails:
--- SNIP ---
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
--- SNIP ---
After doing some searching on the net, the following thing cropped up:
--- SNIP ---
Initial Comment:
Configure was setting gcc -shared to build shared libraries on SunOS.
Changed it back to gcc -G. The -shared option does not work on Solaris
[...]
ld: fatal: relocations remain against allocatable but
non-writable sections
These messages, and the error, goes away when using gcc -G.
--- SNIP ---
I tried this suggestion, changed the C/C++ project settings (uncheck
-shared, add -G), and the shared library seems to build after that change.
The bigger question, is this something that should be fixed in the CDT
as well, should there be different default settings for the Solaris GCC
Toolchain?
How can I check if my build environment for CDT has the right settings
to make sure the two Sun CC and GCC are not mixed up? Somebody reports
on this possible problem.
--- SNIP ---
Do not use GCC with Sun's assembler/linker, this will result in
link-time errors in shared libraries. Use GNU binutils instead.
-- SNIP ---
Thanks,
Dann