Getting <ERROR: using undefined symbol!> when running a client with a header from an external library.

451 views
Skip to first unread message

j.pedronasc...@gmail.com

unread,
Dec 9, 2017, 4:33:56 PM12/9/17
to DynamoRIO Users
Hi, I created a client for DynamoRio and I am using an external library from DynamoRio.
To link this library I inserted target_link_libraries(<target> "/path/to/the/library/.a") in CMakeLists.txt.
Also, in the source file of my client I inserted the header from this external library.
I am able to compile the client. But when I am running it, I get the error <ERROR: using undefined symbol!>
Running my client with the flags -debug -loglevel 1, I got the warning <WARNING! symbol lookup error: mylib.so undefined symbol function_on_my_header_file>.
My knoledge in Cmake is very low. So, I searched on the internet and they say to insert in CMakeLists.txt include_directories(), but it did not worked.
Can you guys help me please? What am I suppose to do to correct this error/warning?

Derek Bruening

unread,
Dec 11, 2017, 7:53:16 PM12/11/17
to dynamor...@googlegroups.com
Use tools like "nm" to see what kind of symbol it is in the .a and in the final .so.  Are you building with -fvisibility=hidden?

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-users+unsubscribe@googlegroups.com.
To post to this group, send email to dynamorio-users@googlegroups.com.
Visit this group at https://groups.google.com/group/dynamorio-users.
For more options, visit https://groups.google.com/d/optout.

j.pedronasc...@gmail.com

unread,
Dec 18, 2017, 12:46:33 PM12/18/17
to DynamoRIO Users
Thanks Derek.

I used nm like you said. I saw that the symbols were marked as U(undefined). To solve it I added to the my client's CMakeLists.txt the source code of the external library and it worked, the symbols now are marked as T.

Also I had to add the -pthread flag once the external library uses pthread and semaphore.

But now I am getting this error: <ERROR: master_signal_handler with no siginfo (i#26?): tid=2818, sig=11>

What could I do to try to find out what is causing this error?

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To post to this group, send email to dynamor...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages