View Single Post
  #5   Spotlight this post!  
Unread 17-01-2017, 00:00
Thomas DeSilva's Avatar
Thomas DeSilva Thomas DeSilva is offline
Programming Fury
FRC #1983 (Skunkworks)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2009
Location: Des Moines, WA
Posts: 22
Thomas DeSilva is on a distinguished road
Re: libNiFpgaLv.so has wrong SONAME in ELF header?

I moved all the libraries from the RoboRIO into my library search path, which solved the issue in my original post. However, now I have a different problem:
Code:
symbol lookup error: /lib/libHALAthena.so: undefined symbol: _ZN5nFPGA16nFRC_2017_17_0_220g_currentTargetClassE
I searched all of the libraries I have for this symbol and found it in libFRC_NetworkCommunicationLV.so.17.0.0, but libHALAthena.so doesn't require it:

Code:
$ readelf -dW /usr/arm-frc-linux-gnueabi/lib/libHALAthena.so

Dynamic section at offset 0x42434 contains 37 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libFRC_NetworkCommunication.so.17]
 0x00000001 (NEEDED)                     Shared library: [libi2c.so.2]
 0x00000001 (NEEDED)                     Shared library: [libRoboRIO_FRC_ChipObject.so.17]
 0x00000001 (NEEDED)                     Shared library: [libspi.so.1]
 0x00000001 (NEEDED)                     Shared library: [libvisa.so]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [librt.so.1]
 0x00000001 (NEEDED)                     Shared library: [libMathParser_gcc-4.4-arm_v3_0_NI.so]
 0x00000001 (NEEDED)                     Shared library: [libwpiutil.so]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so.6]
 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x0000000e (SONAME)                     Library soname: [libHALAthena.so]
Code:
$ readelf -sW wpilib/cpp/current/lib/libFRC_NetworkCommunication.so.17.0.0 | grep FPGA
    37: 00066948    41 OBJECT  WEAK   DEFAULT   12 _ZTS38NetCommRPC_getFPGAHardwareVersion_args
    45: 00067198    42 OBJECT  WEAK   DEFAULT   12 _ZTS39NetCommRPC_getFPGAHardwareVersion_pargs
    48: 0007ce80     8 OBJECT  WEAK   DEFAULT   18 _ZTI40NetCommRPC_getFPGAHardwareVersion_result
   233: 0006716c    44 OBJECT  WEAK   DEFAULT   12 _ZTS41NetCommRPC_getFPGAHardwareVersion_presult
   314: 0007ce68     8 OBJECT  WEAK   DEFAULT   18 _ZTI38NetCommRPC_getFPGAHardwareVersion_args
   317: 00066974    43 OBJECT  WEAK   DEFAULT   12 _ZTS40NetCommRPC_getFPGAHardwareVersion_result
   339: 0000d098    32 FUNC    GLOBAL DEFAULT   10 getFPGAHardwareVersion
   432: 0007d348     8 OBJECT  WEAK   DEFAULT   18 _ZTI39NetCommRPC_getFPGAHardwareVersion_pargs
   440: 0007c240     8 OBJECT  WEAK   DEFAULT   18 _ZTI11FPGAVersion
   449: 000657f0    14 OBJECT  WEAK   DEFAULT   12 _ZTS11FPGAVersion
   537: 0007d330     8 OBJECT  WEAK   DEFAULT   18 _ZTI41NetCommRPC_getFPGAHardwareVersion_presult

$ readelf -sW wpilib/cpp/current/lib/libFRC_NetworkCommunicationLV.so.17.0.0 | grep FPGA
     3: 00000000     0 OBJECT  GLOBAL DEFAULT  UND _ZN5nFPGA16nFRC_2017_17_0_220g_currentTargetClassE
__________________
Programmer 2009-2011
Driver 2011
WPI Class of 2015
Reply With Quote