This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

New (to me) undefined symbol issue when linking


I'm building a library called libschroedinger1.0-1.0.10
The make step fails at this point:

--- BEGIN ---
libtool: link: gcc -Wall
-I/usr/src/libschroedinger1.0-1.0.10-1/src/schroedinger-1.0.10
-I/usr/include/orc-0.4 -DSCHRO_ENABLE_UNSTABLE_API -g -O3 -pipe -o
.libs/wavelet_2d.exe wavelet_2d.o  ./.libs/libschrotest.a
/usr/src/libschroedinger1.0-1.0.10-1/build/schroedinger/.libs/libschroedinger-1.0.dll.a
../schroedinger/.libs/libschroedinger-1.0.dll.a
/usr/lib/gcc/i686-pc-cygwin/4.5.3/libstdc++.dll.a -lpthread
/usr/lib/liborc-test-0.4.dll.a /usr/lib/liborc-0.4.dll.a -lrt
-L/usr/lib/gcc/i686-pc-cygwin/4.5.3
wavelet_2d.o: In function `orc_deinterleave2_s16':
/usr/src/libschroedinger1.0-1.0.10-1/build/testsuite/../schroedinger/schroorc.h:1058:
undefined reference to `__orc_code_orc_deinterleave2_s16'
wavelet_2d.o: In function `orc_interleave2_s16':
/usr/src/libschroedinger1.0-1.0.10-1/build/testsuite/../schroedinger/schroorc.h:1020:
undefined reference to `__orc_code_orc_interleave2_s16'
collect2: ld returned 1 exit status
--- END ---

Delving into the object files with nm, I find:

--- BEGIN ---
$ find /usr/src/libschroedinger1.0-1.0.10-1/build/ -type f | xargs nm
-A --defined-only 2>/dev/null | grep orc_code_orc_deinterleave2_s16
/usr/src/libschroedinger1.0-1.0.10-1/build/schroedinger/.libs/cygschroedinger-1.0-0.dll:63b2b4dc
B __orc_code_orc_deinterleave2_s16
/usr/src/libschroedinger1.0-1.0.10-1/build/schroedinger/.libs/libschroedinger_1.0_la-tmp-orc.o:00000004
C __orc_code_orc_deinterleave2_s16
--- END ---

So it's apparent that the symbols are declared, but not initialized,
in tmp-orc.c, the source for libschroedinger_1.0_la-tmp-orc.o
Delving into the source files I find that:
schroorc.h declares the symbols as extern, but does not define them.
tmp-orc.c sets the symbols inside of an init function.

It turns out that both schroorc.h & tmp-orc.c are created from
schroorc.orc using orcc.exe from the ORC package. I built ORC
immediately before attempting libschroedinger and I know nothing about
ORC other than that schroorc.orc sure looks a lot like assembly.

So, I'm a little stumped about how I can get this lib to build.
Is there a linker or compiler option I can use to force uninitialized
symbols to be initialized to NULL?
Any other suggestions for a way forward?

NT

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]