Bug #675

Problem in linker command on linux

Added by Massimo Del Fedele over 10 years ago. Updated over 10 years ago.

Status:ApprovedStart date:02/03/2014
Priority:HighDue date:
Assignee:Miroslav Fidler% Done:

100%

Category:IDESpent time:-
Target version:-

Description

In a big project, using many dynamic libraries, I've got a linker problem of "undefined symbol" for symbols inside dynamic .so libraries.
I double checked, and symbols are there.
So I tried to replicate the issue by command line. IDE linker command is:
@
-o
"/home/massimo/sources/upp-svn/out/UppCad/GCC.Debug.Debug_Full.Gui.Mt.Noblitz.Nogtk.Shared/UppCad"
-ggdb
-L"/usr/X11R6/lib"
-L"/usr/local/lib/oce"
-Wl,-O,2

<object files>

-Wl,--start-group

<packages static libs>

<dynamic libs>

-Wl,--end-group
@

notice the --start-group and --end-group enclosing both static and shared libraries.
The manual command gave same error as theide one.
Moving the --end-group at end of static libs (GCC manual states that it's only used for static objects, not shared ones...):
@
-o
"/home/massimo/sources/upp-svn/out/UppCad/GCC.Debug.Debug_Full.Gui.Mt.Noblitz.Nogtk.Shared/UppCad"
-ggdb
-L"/usr/X11R6/lib"
-L"/usr/local/lib/oce"
-Wl,-O,2

<object files>

-Wl,--start-group

<packages static libs>

-Wl,--end-group

<dynamic libs>
@

The undefined symbols disappear.
I'm writing a patch for theide; Mirek please tell me if it's ok if I apply it.

History

#1 Updated by Massimo Del Fedele over 10 years ago

  • Status changed from In Progress to Patch ready

I patched theide and now it's ok.
BTW, I hat the same problem building theide itself.... I guess it's some GCC recent update.
With the patch theide (and my app) are building ok.

#2 Updated by Miroslav Fidler over 10 years ago

  • Assignee changed from Miroslav Fidler to Massimo Del Fedele

I am confused here.. What have you patched? :) (Any files in ide?)

#3 Updated by Massimo Del Fedele over 10 years ago

  • Assignee changed from Massimo Del Fedele to Miroslav Fidler

Yes, but still not committed. If you mean I'll do it right now.

#4 Updated by Massimo Del Fedele over 10 years ago

  • Status changed from Patch ready to Ready for QA
  • % Done changed from 0 to 100

Well, updated.... anyways I tested it with some builds and seems all ok.

#5 Updated by Miroslav Fidler over 10 years ago

  • Status changed from Ready for QA to Approved

Also available in: Atom PDF