Link problem on Solaris 11.3

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Link problem on Solaris 11.3

Phil Stracchino
I'm bringing up a new server, a SunFire X4540 on which I've installed
Solaris 11.3, and I'm attempting to install apcupsd 3.14.4, compiling
using gcc-4.9.4.  Very simple basic configuration with no frills:

./configure --prefix=/usr --sysconfdir=/etc --with-log-dir=/var/log

Everything goes fine until link time, when I get an unresolved symbol:

  LD    src/apcupsd
Undefined                       first referenced
 symbol                             in file
_Unwind_GetIPInfo
/usr/gcc/4.9/lib/gcc/i386-pc-solaris2.11/4.9.4/../../../libsupc++.a(eh_personality.o)
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status


Does anyone have any insights on resolving this problem?


--
  Phil Stracchino
  Babylon Communications
  [hidden email]
  [hidden email]
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Link problem on Solaris 11.3

Trevor Roydhouse
Phil Stracchino wrote on 18/07/2017 00:33:

> I'm bringing up a new server, a SunFire X4540 on which I've installed
> Solaris 11.3, and I'm attempting to install apcupsd 3.14.4, compiling
> using gcc-4.9.4.  Very simple basic configuration with no frills:
>
> ./configure --prefix=/usr --sysconfdir=/etc --with-log-dir=/var/log
>
> Everything goes fine until link time, when I get an unresolved symbol:
>
>   LD    src/apcupsd
> Undefined                       first referenced
>  symbol                             in file
> _Unwind_GetIPInfo
> /usr/gcc/4.9/lib/gcc/i386-pc-solaris2.11/4.9.4/../../../libsupc++.a(eh_personality.o)
> ld: fatal: symbol referencing errors
> collect2: error: ld returned 1 exit status
>
>
> Does anyone have any insights on resolving this problem?
My Google Fu came up with:

_Unwind_GetIPInfo is defined in libgcc_s.so - is that file present in
the same directory as libstdc++.so?

If you add -v to the compilation command it will show you the
directories gcc searches, is libgcc_s.so in any of those directories?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Link problem on Solaris 11.3

Phil Stracchino
On 07/17/17 20:34, Trevor Roydhouse wrote:

> Phil Stracchino wrote on 18/07/2017 00:33:
>> I'm bringing up a new server, a SunFire X4540 on which I've installed
>> Solaris 11.3, and I'm attempting to install apcupsd 3.14.4, compiling
>> using gcc-4.9.4.  Very simple basic configuration with no frills:
>>
>> ./configure --prefix=/usr --sysconfdir=/etc --with-log-dir=/var/log
>>
>> Everything goes fine until link time, when I get an unresolved symbol:
>>
>>   LD    src/apcupsd
>> Undefined                       first referenced
>>  symbol                             in file
>> _Unwind_GetIPInfo
>> /usr/gcc/4.9/lib/gcc/i386-pc-solaris2.11/4.9.4/../../../libsupc++.a(eh_personality.o)
>> ld: fatal: symbol referencing errors
>> collect2: error: ld returned 1 exit status
>>
>>
>> Does anyone have any insights on resolving this problem?
>
> My Google Fu came up with:
>
> _Unwind_GetIPInfo is defined in libgcc_s.so - is that file present in
> the same directory as libstdc++.so?


I will definitely check for that and give it a try.  I hunted for a
reference to where it was defined but couldn't find one.


--
  Phil Stracchino
  Babylon Communications
  [hidden email]
  [hidden email]
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Link problem on Solaris 11.3

Phil Stracchino
In reply to this post by Trevor Roydhouse
On 07/17/17 20:34, Trevor Roydhouse wrote:
>
> _Unwind_GetIPInfo is defined in libgcc_s.so - is that file present in
> the same directory as libstdc++.so?
>
> If you add -v to the compilation command it will show you the
> directories gcc searches, is libgcc_s.so in any of those directories?

Turns out that libgcc_s.so was present everywhere it should be, but
adding -lgcc_s did not resolve the issue.  (Or the symbol.)


--
  Phil Stracchino
  Babylon Communications
  [hidden email]
  [hidden email]
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Link problem on Solaris 11.3

Phil Stracchino
On 07/18/17 09:28, Phil Stracchino wrote:

> On 07/17/17 20:34, Trevor Roydhouse wrote:
>>
>> _Unwind_GetIPInfo is defined in libgcc_s.so - is that file present in
>> the same directory as libstdc++.so?
>>
>> If you add -v to the compilation command it will show you the
>> directories gcc searches, is libgcc_s.so in any of those directories?
>
> Turns out that libgcc_s.so was present everywhere it should be, but
> adding -lgcc_s did not resolve the issue.  (Or the symbol.)


I tried compiling with Oracle Developer Studio instead of gcc to see if
I could avoid the link problem.  Turns out apcupsd won't compile at all
using Sun^WOracle CC.


asgard:root:~/build/apcupsd-3.14.14:46 # gmake
        src
        src/lib
  CXX   src/lib/apcconfig.c
CC: Warning: Option -x passed to ld, if ld is invoked, ignored otherwise
CC: Warning: GCC option -fno-rtti ignored
"/root/build/apcupsd-3.14.14/include/getopt.h", line 111: Error: Only
one of a set of overloaded functions can be extern "C".
"/root/build/apcupsd-3.14.14/include/struct.h", line 66: Warning:
Identifier expected instead of "}".
"/root/build/apcupsd-3.14.14/include/struct.h", line 73: Warning:
Identifier expected instead of "}".
"/root/build/apcupsd-3.14.14/include/struct.h", line 79: Warning:
Identifier expected instead of "}".
"/root/build/apcupsd-3.14.14/include/drivers.h", line 110: Warning: cmd
is defined but not used.
"/root/build/apcupsd-3.14.14/include/drivers.h", line 110: Warning: data
is defined but not used.
"/root/build/apcupsd-3.14.14/include/drivers.h", line 111: Warning: cmd
is defined but not used.
"/root/build/apcupsd-3.14.14/include/drivers.h", line 111: Warning: data
is defined but not used.
"apcconfig.c", line 603: Warning: cfgfile hides the same name in an
outer scope.
"apcconfig.c", line 672: Warning: Too few arguments in macro Error_abort.
"apcconfig.c", line 709: Warning: Too few arguments in macro Error_abort.
"apcconfig.c", line 717: Warning: Too few arguments in macro Error_abort.
1 Error(s) and 11 Warning(s) detected.
gmake[3]: *** [.obj/apcconfig.o] Error 2
gmake[2]: *** [all] Error 2
gmake[1]: *** [lib_DIR] Error 2
gmake: *** [src_DIR] Error 2


--
  Phil Stracchino
  Babylon Communications
  [hidden email]
  [hidden email]
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Link problem on Solaris 11.3

Ted Mittelstaedt-5
Phil,

Do you have LD_LIBRARY_PATH defined to put perhaps an older or different
library ahead of the correct library?

It looks to me like maybe you have multiple compiler versions on that
machine and the library path search order is fubared.

Ted

On 7/20/2017 7:45 AM, Phil Stracchino wrote:

> On 07/18/17 09:28, Phil Stracchino wrote:
>> On 07/17/17 20:34, Trevor Roydhouse wrote:
>>>
>>> _Unwind_GetIPInfo is defined in libgcc_s.so - is that file present in
>>> the same directory as libstdc++.so?
>>>
>>> If you add -v to the compilation command it will show you the
>>> directories gcc searches, is libgcc_s.so in any of those directories?
>>
>> Turns out that libgcc_s.so was present everywhere it should be, but
>> adding -lgcc_s did not resolve the issue.  (Or the symbol.)
>
>
> I tried compiling with Oracle Developer Studio instead of gcc to see if
> I could avoid the link problem.  Turns out apcupsd won't compile at all
> using Sun^WOracle CC.
>
>
> asgard:root:~/build/apcupsd-3.14.14:46 # gmake
>          src
>          src/lib
>    CXX   src/lib/apcconfig.c
> CC: Warning: Option -x passed to ld, if ld is invoked, ignored otherwise
> CC: Warning: GCC option -fno-rtti ignored
> "/root/build/apcupsd-3.14.14/include/getopt.h", line 111: Error: Only
> one of a set of overloaded functions can be extern "C".
> "/root/build/apcupsd-3.14.14/include/struct.h", line 66: Warning:
> Identifier expected instead of "}".
> "/root/build/apcupsd-3.14.14/include/struct.h", line 73: Warning:
> Identifier expected instead of "}".
> "/root/build/apcupsd-3.14.14/include/struct.h", line 79: Warning:
> Identifier expected instead of "}".
> "/root/build/apcupsd-3.14.14/include/drivers.h", line 110: Warning: cmd
> is defined but not used.
> "/root/build/apcupsd-3.14.14/include/drivers.h", line 110: Warning: data
> is defined but not used.
> "/root/build/apcupsd-3.14.14/include/drivers.h", line 111: Warning: cmd
> is defined but not used.
> "/root/build/apcupsd-3.14.14/include/drivers.h", line 111: Warning: data
> is defined but not used.
> "apcconfig.c", line 603: Warning: cfgfile hides the same name in an
> outer scope.
> "apcconfig.c", line 672: Warning: Too few arguments in macro Error_abort.
> "apcconfig.c", line 709: Warning: Too few arguments in macro Error_abort.
> "apcconfig.c", line 717: Warning: Too few arguments in macro Error_abort.
> 1 Error(s) and 11 Warning(s) detected.
> gmake[3]: *** [.obj/apcconfig.o] Error 2
> gmake[2]: *** [all] Error 2
> gmake[1]: *** [lib_DIR] Error 2
> gmake: *** [src_DIR] Error 2
>
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Link problem on Solaris 11.3

Phil Stracchino
On 07/23/17 14:48, Ted Mittelstaedt wrote:
> Phil,
>
> Do you have LD_LIBRARY_PATH defined to put perhaps an older or different
> library ahead of the correct library?
>
> It looks to me like maybe you have multiple compiler versions on that
> machine and the library path search order is fubared.


Hmm ....   now that you mention it, it is *possible* the linker is
picking up the system's libgcc_s instead of the C compiler's.  It
*SHOULDN'T* be doing so, but...

I gave up fighting the link problem a few days ago and installed
OpenCSW's apcupsd package, and that sees to be working fine.  The link
problem hasn't occurred with anything else I've built.


--
  Phil Stracchino
  Babylon Communications
  [hidden email]
  [hidden email]
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Loading...