Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Fix MakeFile #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix MakeFile #6

wants to merge 1 commit into from

Conversation

cmft
Copy link

@cmft cmft commented Oct 11, 2018

The generated library is wrong (has undefined symbol) since tango libraries
are not set.

Add them and a linker flag to report this error. When creating a shared object,
this flag will cause the link to fail if there are unresolved symbols

The generated library is wrong (has undefined symbol) since tango libraries 
are not set.

Add them and a linker flag to report this error. When creating a shared object,
this flag will cause the link to fail if there are unresolved symbols
@lorenzopivetta
Copy link

I do not think you need to link this .so against the TANGO libraries... symbols will be resolved at runtime

@gscalam
Copy link
Collaborator

gscalam commented Oct 15, 2018

I dont't know,
@chedburgh and @bourtemb what do you think and what about libhdbpp-cassandra ?

@cmft
Copy link
Author

cmft commented Oct 15, 2018

Hi all,
we detected this problem when we tried to import this library from python.
If you try to compile the library with -z,defs flag without adding the libraries, it reports the linking problems.

The ldd cmd does not show the link with tango libraries

$ ldd /usr/lib/x86_64-linux-gnu/libhdb++mysql.so.6.0.0 
        linux-vdso.so.1 (0x00007fff7f133000)
        libmariadbclient.so.18 => /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18 (0x00007f86c6093000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f86c5e76000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f86c5c5c000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f86c5a58000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f86c56d6000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f86c53d2000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f86c51bb000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f86c4e1c000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f86c68fc000)

@lorenzopivetta
Copy link

At a quick look, according to the gcc man page, the -z "keyword" is an option that gets passed straight to the linker. That is, you ask the linker to resolve against the known library paths. Still, I'm in the idea this is not required at this stage. Tango (and system) libraries get resolved when the linker is instructed to produce the final object.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants