Samba 3.5 configure/shared lib question.

William Jojo w.jojo at hvcc.edu
Mon Mar 1 14:55:47 MST 2010


I've noticed that since 3.4.x, the use of -error_unresolved or 
-Wl,-error_unresolved was changed from OS dependent:

        case "$host_os" in
                *osf*)
                        LD_SHLIB_DISALLOW_UNDEF_FLAG="-warning_unresolved"
                        ;;
                *darwin*)
                        LD_SHLIB_DISALLOW_UNDEF_FLAG="-undefined error"
                        ;;
        esac


To something less with committ 438f400680a5952ef419e4045d85076b8f723f0f.

The note is:

+# for historical reasons almost all linkers don't complain about unresolved
+# symbols in shared libs. Except for the internal samba modules we want to get
+# errors when we produce a shared lib with unresolved symbols. On some
+# platforms unresolved symbols might be intended, so we might have to add
+# platform specific exceptions here.
+
+for flags in "-Wl,-z,defs" "-error_unresolved" "-Wl,-error_unresolved" ; do



The problems is config.log shows:

configure:51947: checking if -error_unresolved works
configure:51971: gcc -O2 
-Wl,-blibpath:/opt/pware/lib:/usr/lib:/lib,-brtl -o con
ftest -O2 -I/opt/pware/include -I/opt/pware/include -Iinclude 
-I./include  -I. -
I. -I./../lib/replace -I./../lib/tevent -I./libaddns -I./librpc -I./.. 
-I./../li
b/popt -error_unresolved    -L/opt/pware/lib  -L./bin conftest.c     >&5
ld: 0711-327 WARNING: Entry point not found: rror_unresolved
configure:51978: $? = 0
configure:51986: result: yes
configure:52005: checking LDSHFLAGS_Z_DEFS
configure:52007: result: -error_unresolved


Which means that AIX (maybe others) tries to use the option 
"-error_unresolved" with ld, but this tries to set a specific entry 
point "rror_unresolved". Since this only produces a warning, ld allows 
the process to proceed.

I don't have a specific fix yet, but could someone enlighten me on what 
the intentions were for this? Is it really essential that all symbols 
resolve in the shared libs? My understanding is that when the 
executables are built, the default is to fail if a symbol cannot be 
found in the list of libs (including shared) provided to the linker.

Or did I miss something obvious?

Cheers,
Bill



More information about the samba-technical mailing list