I develop library and trying run tests. When I run example building I got the undefined reference errors (in example one of that errors):
/opt/nt/lib/libntproto2db.so: undefined reference to ntproto::variant_t::TYPE::UINT8'
But, if I install same version with same commit from repository, which contains package built on the someone else machine, i have not received this error.
nm tool recognizes symbol as undefined, if library built on my machine:
$ nm -C -u /opt/nt/lib/libntproto2db.so | grep UINT8
                 U ntproto::variant_t::TYPE::UINT8
That is, if I build this library on another machine, then these symbols do not become undefined. Why?
I tried:
- Move std::unordered_mapglobalinline constvariable, that contains values of this type from.hto.ccfile, that helped, but this is bad solution.
- Disable optimization -O0
- Check $LIBRARY_PATH, it's clear as a must be.
- View ldcommandline during both builds (make VERBOSE=1), it is the same.
