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/include/orc-0.4 -DSCHRO_ENABLE_UNSTABLE_API -g -O3 -pipe -o
.libs/wavelet_2d.exe wavelet_2d.o  ./.libs/libschrotest.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
wavelet_2d.o: In function `orc_deinterleave2_s16':
undefined reference to `__orc_code_orc_deinterleave2_s16'
wavelet_2d.o: In function `orc_interleave2_s16':
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
B __orc_code_orc_deinterleave2_s16
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?


Problem reports:
Unsubscribe info:

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