[opensuse] g++ compile question on openSUSE 11.2
I am trying to compile another company's proprietary library, and I have run in to something beyond my experience. The library is written in C++, and I am a C programmer. Anyway, all compiles and links ok, except that the following remains: undefined symbol: __dso_handle I have searched, and it seems this is often attributed to number of factors, including (1) an error in the system libraries, or (2) an incorrect mix of libraries when linking. I have no idea which is my problem. But item 1 indicates that I should check the system setup. So, I am. I see that SUSE's Andreas Jaeger has been part of the discussions way back. Otherwise, I have not noted any recent SUSE-specific references to this topic. A search on bugzilla and SUSE forums returned 0 references. Anyone have this issue on openSUSE 11.2? Or anyone have any idea where one would start to look? I tried removing all the libraries I link with, but the reference remained (ldd -r on the .so). Not sure what that means. I also tried making an app with the library, just in case it is something that gets pulled in when an executable is made. No joy there. Perhaps I missed the library where this is defined? -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
I won't once again quote the appropriate Roseann Roseannadanna line, but I have sorted out the dso_handle reference. I was making the library with ld (as is my wont). I saw a suggestion to use gcc instead. This does seem to have cleared up things. At least I get a clean compile/link. So, nothing to see here. Move along. -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 09/12/09 06:28, Roger Oberholtzer wrote:
I won't once again quote the appropriate Roseann Roseannadanna line, but I have sorted out the dso_handle reference. I was making the library with ld (as is my wont). I saw a suggestion to use gcc instead. This does seem to have cleared up things. At least I get a clean compile/link. So, nothing to see here. Move along.
Link and compile with g++ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wed, 09 Dec 2009 10:28:41 +0100, you wrote:
was making the library with ld (as is my wont).
That is almost always a bad idea. Always use gcc/g++ to link a library as you never know which additional libraries are needed. gcc compiled code needs libgcc and C++ code needs another runtime library. Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 2009-12-10 at 05:34 +0100, Philipp Thomas wrote:
On Wed, 09 Dec 2009 10:28:41 +0100, you wrote:
was making the library with ld (as is my wont).
That is almost always a bad idea. Always use gcc/g++ to link a library as you never know which additional libraries are needed. gcc compiled code needs libgcc and C++ code needs another runtime library.
I jave no trouble sorting out additional libraries. Of course, I usually work in the C part of things. c++ has just those extra bits I am unaware of. Anyway, using gcc as the linker, and the -Wl,-XXX option, I can get all I need. -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Am Mittwoch, 9. Dezember 2009 schrieb Roger Oberholtzer:
I am trying to compile another company's proprietary library, and I have run in to something beyond my experience. The library is written in C++, and I am a C programmer. Anyway, all compiles and links ok, except that the following remains:
undefined symbol: __dso_handle
I have searched, and it seems this is often attributed to number of factors, including (1) an error in the system libraries, or (2) an incorrect mix of libraries when linking. I have no idea which is my problem. But item 1 indicates that I should check the system setup. So, I am. I see that SUSE's Andreas Jaeger has been part of the discussions way back. Otherwise, I have not noted any recent SUSE-specific references to this topic. A search on bugzilla and SUSE forums returned 0 references.
Anyone have this issue on openSUSE 11.2? Or anyone have any idea where one would start to look? I tried removing all the libraries I link with, but the reference remained (ldd -r on the .so). Not sure what that means. I also tried making an app with the library, just in case it is something that gets pulled in when an executable is made. No joy there. Perhaps I missed the library where this is defined?
Are you using ld for linking ? According to http://sourceware.org/ml/binutils/2002-11/msg00310.html only gcc can be used as linker for C++ on linux -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sun, 2009-12-20 at 16:07 +0100, Markus Koßmann wrote:
According to http://sourceware.org/ml/binutils/2002-11/msg00310.html only gcc can be used as linker for C++ on linux
This was indeed the problem, as was noted earlier. After changing to gcc to link, all has gone ok. Thanks for the feedback. -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Cristian Rodríguez
-
Markus Koßmann
-
Philipp Thomas
-
Roger Oberholtzer