Menu

#21 strange messages

1.0
open
nobody
None
2019-03-05
2017-05-25
No

Hello,

When link i have the next mesages:

/usr/bin/ld: //usr/local/lib/libraspicam_cv.so: invalid string offset 4504 >= 3981 for section .strtab' /usr/bin/ld: //usr/local/lib/libraspicam_cv.so: invalid string offset 4489 >= 3981 for section.strtab'
/usr/bin/ld: //usr/local/lib/libraspicam_cv.so: invalid string offset 4477 >= 3981 for section .strtab' /usr/bin/ld: //usr/local/lib/libraspicam_cv.so: invalid string offset 4515 >= 3981 for section.strtab'
/usr/bin/ld: //usr/local/lib/libraspicam_cv.so: invalid string offset 4523 >= 3981 for section .strtab' /usr/bin/ld: //usr/local/lib/libraspicam_cv.so: invalid string offset 4470 >= 3981 for section.strtab'
/usr/bin/ld: //usr/local/lib/libraspicam_cv.so: invalid string offset 4503 >= 3981 for section `.strtab'

thanks

Discussion

  • Karl Mueller

    Karl Mueller - 2017-12-24

    I have this problem as well.
    Raspberry pi 3 model B

    libraries built with version 0.1.6 and 0.1.4 fail to link when included in my project.

    The problem doesn't seem to happen in version 0.1.3

     
  • Bob Haines

    Bob Haines - 2018-08-07

    I have this problem too. Raspberry pi 3 model B. I'm guessing this is something simple? It seems to be preventing me from a successful build in the later steps.

     
  • Bob Haines

    Bob Haines - 2018-08-08

    More information: if I follow the steps listed on this page: http://www.uco.es/investiga/grupos/ava/node/40 (identical to the sourceforge readme file I think). This is built using cmake (I have very little experience with cmake). The library builds along with executables for raspicam_cv_still_test, raspicam_cv_test, raspicam_still_test and raspicam_test. All of the executables created with the cmake scripts run correctly. However, if I follow the directions for "Using it in your projects", I am unable to get the individual cpp files to build properly -- I get the strange messages above when linking and a compilation failed error.
    I'm guessing that I am missing an include or an include path when compiling the standalone project -- any guesses what it is? I appreciate the help.

    the exact errors are:
    g++ -Wall -o "raspicam_cv_still_test" "raspicam_cv_still_test.cpp" -I/usr/local/include/ -lraspicam -lraspicam_cv -lmmal -lmmal_core -lmmal_util -lopencv_core -lopencv_highgui (in directory: /home/pi/usbmem/raspicam/raspicam-0.1.6/utils)
    /usr/bin/ld: //usr/local/lib/libraspicam_cv.so: invalid string offset 4610 >= 4040 for section .strtab' /usr/bin/ld: //usr/local/lib/libraspicam_cv.so: invalid string offset 4595 >= 4040 for section.strtab'
    /usr/bin/ld: //usr/local/lib/libraspicam_cv.so: invalid string offset 4583 >= 4040 for section .strtab' /usr/bin/ld: //usr/local/lib/libraspicam_cv.so: invalid string offset 4621 >= 4040 for section.strtab'
    /usr/bin/ld: //usr/local/lib/libraspicam_cv.so: invalid string offset 4629 >= 4040 for section .strtab' /usr/bin/ld: //usr/local/lib/libraspicam_cv.so: invalid string offset 4576 >= 4040 for section.strtab'
    /usr/bin/ld: //usr/local/lib/libraspicam_cv.so: invalid string offset 4609 >= 4040 for section `.strtab'
    /usr/bin/ld: cannot find -lmmal
    /usr/bin/ld: cannot find -lmmal_core
    /usr/bin/ld: cannot find -lmmal_util
    collect2: error: ld returned 1 exit status
    Compilation failed.

     

    Last edit: Bob Haines 2018-08-08
  • OldETC

    OldETC - 2019-03-05

    I begain experiencing these errors just recently. I attempted to rebuild raspicam and got the errors as well:
    /************/
    -- Build files have been written to: /home/pi/cloud/raspicam/raspicam-0.1.6/build
    pi@Ppi1:~/cloud/raspicam/raspicam-0.1.6/build $ make
    Scanning dependencies of target raspicam_cv
    [ 5%] Building CXX object src/CMakeFiles/raspicam_cv.dir/raspicam_cv.cpp.o
    [ 11%] Building CXX object src/CMakeFiles/raspicam_cv.dir/raspicam_still_cv.cpp.o
    [ 17%] Linking CXX shared library libraspicam_cv.so
    [ 17%] Built target raspicam_cv
    Scanning dependencies of target raspicam
    [ 23%] Building CXX object src/CMakeFiles/raspicam.dir/raspicam.cpp.o
    [ 29%] Building CXX object src/CMakeFiles/raspicam.dir/raspicam_still.cpp.o
    [ 35%] Building CXX object src/CMakeFiles/raspicam.dir/private/private_impl.cpp.o
    [ 41%] Building CXX object src/CMakeFiles/raspicam.dir/private/threadcondition.cpp.o
    [ 47%] Building CXX object src/CMakeFiles/raspicam.dir/private_still/private_still_impl.cpp.o
    /home/pi/cloud/raspicam/raspicam-0.1.6/src/private_still/private_still_impl.cpp: In member function ‘int raspicam::_private::Private_Impl_Still::startCapture(raspicam::_private::imageTakenCallback, unsigned char
    , unsigned int, unsigned int)’:
    /home/pi/cloud/raspicam/raspicam-0.1.6/src/private_still/private_still_impl.cpp:402:9: warning: no return statement in function returning non-void [-Wreturn-type]
    }
    ^
    /home/pi/cloud/raspicam/raspicam-0.1.6/src/private_still/private_still_impl.cpp: In member function ‘void raspicam::_private::Private_Impl_Still::commitBrightness()’:
    /home/pi/cloud/raspicam/raspicam-0.1.6/src/private_still/private_still_impl.cpp:605:17: warning: narrowing conversion of ‘((raspicam::_private::Private_Impl_Still
    )this)->raspicam::_private::Private_Impl_Still::brightness’ from ‘unsigned int’ to ‘int32_t {aka int}’ inside { } [-Wnarrowing]
    brightness, 100
    ^~~~~~~~~~
    /home/pi/cloud/raspicam/raspicam-0.1.6/src/private_still/private_still_impl.cpp: In member function ‘MMAL_PARAM_IMAGEFX_T raspicam::_private::Private_Impl_Still::convertImageEffect(raspicam::RASPICAM_IMAGE_EFFECT)’:
    /home/pi/cloud/raspicam/raspicam-0.1.6/src/private_still/private_still_impl.cpp:820:9: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    [ 52%] Linking CXX shared library libraspicam.so
    [ 52%] Built target raspicam
    Scanning dependencies of target raspicam_test
    [ 58%] Building CXX object utils/CMakeFiles/raspicam_test.dir/raspicam_test.cpp.o
    [ 64%] Linking CXX executable raspicam_test
    [ 64%] Built target raspicam_test
    Scanning dependencies of target raspicam_still_test
    [ 70%] Building CXX object utils/CMakeFiles/raspicam_still_test.dir/raspicam_still_test.cpp.o
    [ 76%] Linking CXX executable raspicam_still_test
    [ 76%] Built target raspicam_still_test
    Scanning dependencies of target raspicam_cv_still_test
    [ 82%] Building CXX object utils/CMakeFiles/raspicam_cv_still_test.dir/raspicam_cv_still_test.cpp.o
    [ 88%] Linking CXX executable raspicam_cv_still_test
    /usr/bin/ld: ../src/libraspicam_cv.so: invalid string offset 4472 >= 4040 for section .strtab' /usr/bin/ld: ../src/libraspicam_cv.so: invalid string offset 4457 >= 4040 for section.strtab'
    /usr/bin/ld: ../src/libraspicam_cv.so: invalid string offset 4445 >= 4040 for section .strtab' /usr/bin/ld: ../src/libraspicam_cv.so: invalid string offset 4483 >= 4040 for section.strtab'
    /usr/bin/ld: ../src/libraspicam_cv.so: invalid string offset 4491 >= 4040 for section .strtab' /usr/bin/ld: ../src/libraspicam_cv.so: invalid string offset 4438 >= 4040 for section.strtab'
    /usr/bin/ld: ../src/libraspicam_cv.so: invalid string offset 4471 >= 4040 for section .strtab' [ 88%] Built target raspicam_cv_still_test Scanning dependencies of target raspicam_cv_test [ 94%] Building CXX object utils/CMakeFiles/raspicam_cv_test.dir/raspicam_cv_test.cpp.o [100%] Linking CXX executable raspicam_cv_test /usr/bin/ld: ../src/libraspicam_cv.so: invalid string offset 4472 >= 4040 for section.strtab'
    /usr/bin/ld: ../src/libraspicam_cv.so: invalid string offset 4457 >= 4040 for section .strtab' /usr/bin/ld: ../src/libraspicam_cv.so: invalid string offset 4445 >= 4040 for section.strtab'
    /usr/bin/ld: ../src/libraspicam_cv.so: invalid string offset 4483 >= 4040 for section .strtab' /usr/bin/ld: ../src/libraspicam_cv.so: invalid string offset 4491 >= 4040 for section.strtab'
    /usr/bin/ld: ../src/libraspicam_cv.so: invalid string offset 4438 >= 4040 for section .strtab' /usr/bin/ld: ../src/libraspicam_cv.so: invalid string offset 4471 >= 4040 for section.strtab'
    [100%] Built target raspicam_cv_test
    /
    *************/
    I have been searching for several days for a solution. I can find no references to strtbl in the source codes, so I am guessing this error is from the compiler. I cannot find how to adjust the strtab size either.

     
  • OldETC

    OldETC - 2019-03-05

    further research: refer to "libelf by Example", a pdf file talking about the format of ELF binary files. It appears that the ELF header has a string table i.e. strtab built in. So when the files are built by the make command, the string table is created (there are three tables in the file with strtab being the last.) Something is messing up the g++ compiler. When the loader access the file, it attempts to read the string tables to identify each library file''s content and locate the procedures. With the table messed up who knows what is actually being read and used?

     

Log in to post a comment.