"undefined reference to" For "uuid_unparse" And "uuid_generate"
It's been like over a year since I've looked at this project and am noticing changes in the build process, this being one of them...
Using:
opendht: 297e182576f962e9bca6343110f9dcb5c72d2c05 (built/installed/running successfully)
pjproject: 311bd018fc07aaf62d4c2d2494e08b5ee97e6846 (built/installed/questionable?)
dhtnet: b1bcdecb (trying to build)
I even copied the pjproject files over to the associated dependencies folder and edit the build.py
to only build that (already had restinio installed), since this is where I narrowed down the issue to.
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPENDENCIES=OFF -DBUILD_TESTING=OFF -DCMAKE_PREFIX_PATH=/usr/local
...
dependencies path: /<pathTo>/dhtnet/dependencies/install/
...
-- Checking for one of the modules 'opendht'
-- Checking for one of the modules 'libpjproject'
-- Checking for one of the modules 'upnp;libupnp'
-- Checking for one of the modules 'natpmp'
...
Building failed with the error above:
[ 74%] Linking CXX executable dnc
/usr/bin/ld: /usr/lib/libasan.so.8: warning: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /usr/lib/libasan.so.8: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/bin/ld: /usr/lib/libasan.so.8: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /<pathTo>/dhtnet/dependencies/install/lib/libpj-x86_64-unknown-linux-gnu.a(guid_uuid.o): in function `pj_generate_unique_string':
guid_uuid.c:(.text+0x3e): undefined reference to `uuid_generate'
/usr/bin/ld: guid_uuid.c:(.text+0x4b): undefined reference to `uuid_unparse'
collect2: error: ld returned 1 exit status
nm
shows:
guid_uuid.o:
U __assert_fail
0000000000000000 r .LC0
0000000000000016 r .LC1
0000000000000010 T pj_generate_unique_string
0000000000000000 T pj_GUID_STRING_LENGTH
000000000000001c R PJ_GUID_STRING_LENGTH
0000000000000000 r __PRETTY_FUNCTION__.0
U __stack_chk_fail
U uuid_generate
U uuid_unparse
util-linux-libs 2.39.2
/usr/lib/libuuid.so.1.3.0
/usr/include/uuid/uuid.h: extern void uuid_unparse(const uuid_t uu, char *out);
EDIT0: As an aside, perhaps authenticate the emails you're sending (they're being sent to spam because they aren't passing checks):
spf=neutral (google.com: 208.88.110.44 is neither permitted nor denied by best guess record for domain of gitlab@git.jami.net) smtp.mailfrom=gitlab@git.jami.net;
dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=jami.net