Problem linking CINT shared libraries on FreeBSD

I installed Root 5.26.00e on a FreeBSD8.1 i386 system. I configured it as freebsd7, but it worked out. We have implemented an analysis packaged based on root. When linking the shared libraries to CINT there are some problems on the FreeBSD system:

/usr/local/root/bin/rootcint -v -f out/stage6RootDict.cpp -c -p -I<all the include directories> <all the include headers> include/LinkDef.h
dlopen error: /usr/local/lib/root/cint/cint/include/posix.dll: Undefined symbol "cuserid"
Warning: Can not load Dynamic Link Library /usr/local/lib/root/cint/cint/include/posix.dll /usr/local/lib/root/cint/cint/include/posix.dll:1:

The linking of shared libraries “apparently” succeeds, but when launching CINT

root [0] gSystem->Load("../common/lib/")
dlopen error: /usr/home/galante/Software/vegas/macros/./../common/lib/ Undefined symbol "_ZTI5TTree"
Load Error: Failed to load Dynamic link library /usr/home/galante/Software/vegas/macros/./../common/lib/
*** Interpreter error recovered ***

I cannot post the source code of our package (and it would be too many lines), but apparently the problem is in cuserid in posix.dll. Here what nm gives on posix.dll

> nm /usr/local/lib/root/cint/cint/include/posix.dll
00008aac D G__LN___dirstream
00008ab4 D G__LN_dirent
00008aa4 D G__LN_off_t
00008abc D G__LN_stat
00008ac4 D G__LN_utsname
         U G__add_compiledheader
00001b70 T G__c_dllrev
00006f70 T G__c_reset_tagtable
00007100 T G__c_setup
00006f60 T G__c_setup_func
00004f80 T G__c_setup_global
00004c50 T G__c_setup_memvar
00006fc0 T G__c_setup_tagtable
00004110 T G__c_setup_typetable
         U G__check_setup_version
         U G__defined_typename
         U G__get_linked_tagnum
         U G__get_linked_tagnum_fwd
         U G__int
         U G__lastifuncposition
         U G__letint
         U G__memfunc_setup
         U G__memvar_setup
         U G__resetglobalenv
         U G__resetifuncposition
         U G__resetplocal
         U G__search_typename2
00001b10 T G__set_c_environment
         U G__setnewtype
         U G__setnull
         U G__tag_memvar_reset
         U G__tag_memvar_setup
         U G__tagtable_setup
00008ad0 A _DYNAMIC
         w _Jv_RegisterClasses
00008dfc A __bss_start
         w __cxa_finalize@@FBSD_1.0
00008a9c d __dso_handle
00001b07 t __i686.get_pc_thunk.bx
0000714c t
         U __isthreaded@@FBSD_1.0
         U __xuname@@FBSD_1.0
00008dfc A _edata
00008e00 A _end
000071d4 T _fini
00001548 T _init
         U alarm@@FBSD_1.0
         U chdir@@FBSD_1.0
         U chown@@FBSD_1.0
         U close@@FBSD_1.0
         U closedir@@FBSD_1.0
         U ctermid@@FBSD_1.0
         U cuserid
         U dup2@@FBSD_1.0
         U dup@@FBSD_1.0
         U fchdir@@FBSD_1.0
         U fchown@@FBSD_1.0
         U fcntl@@FBSD_1.0
         U fileno@@FBSD_1.0
         U fork@@FBSD_1.0
         U get_current_dir_name
         U getcwd@@FBSD_1.0
         U getegid@@FBSD_1.0
         U geteuid@@FBSD_1.0
         U getgid@@FBSD_1.0
         U getlogin@@FBSD_1.0
         U getpgid@@FBSD_1.0
         U getpgrp@@FBSD_1.0
         U getpid@@FBSD_1.0
         U getppid@@FBSD_1.0
         U getuid@@FBSD_1.0
00007150 T isDirectory
         U link@@FBSD_1.0
         U mkdir@@FBSD_1.0
         U open@@FBSD_1.0
         U opendir@@FBSD_1.0
         U pause@@FBSD_1.0
         U pipe@@FBSD_1.0
         U putenv@@FBSD_1.0
         U read@@FBSD_1.0
         U readdir@@FBSD_1.0
         U rewinddir@@FBSD_1.0
         U rmdir@@FBSD_1.0
         U seekdir@@FBSD_1.0
         U setpgid@@FBSD_1.0
         U setpgrp@@FBSD_1.0
         U setuid@@FBSD_1.0
         U sleep@@FBSD_1.0
         U stat@@FBSD_1.0
         U symlink@@FBSD_1.0
         U sysconf@@FBSD_1.0
         U telldir@@FBSD_1.0
         U time@@FBSD_1.0
         U ttyname@@FBSD_1.0
         U umask@@FBSD_1.0
         U unlink@@FBSD_1.0
         U vfork@@FBSD_1.0
         U write@@FBSD_1.0

the entry cuserid doesn’t have the suffix @@FBSD_1.0
Any idea of how to fix the problem?

Hi, … th=freebsd tyells me that you need to link against libcompat, i.e. add -lcompat to the linker line. That doesn’t explain the missing _ZTI5TTree, though, which I assume is caused by your library missing some object files.

Cheers, Axel.