public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* New (to me) undefined symbol issue when linking
@ 2011-10-06 15:18 Nathan Thern
  2011-10-06 17:28 ` Yaakov (Cygwin/X)
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Thern @ 2011-10-06 15:18 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: New (to me) undefined symbol issue when linking
  2011-10-06 15:18 New (to me) undefined symbol issue when linking Nathan Thern
@ 2011-10-06 17:28 ` Yaakov (Cygwin/X)
  2011-10-10 14:06   ` Nathan Thern
  0 siblings, 1 reply; 3+ messages in thread
From: Yaakov (Cygwin/X) @ 2011-10-06 17:28 UTC (permalink / raw)
  To: cygwin

On Thu, 2011-10-06 at 10:18 -0500, Nathan Thern wrote:
> I'm building a library called libschroedinger1.0-1.0.10
>
> The make step fails at this point:
> 
> 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

It is a known issue that the testsuite does not build with the latest
orc:

http://www.mail-archive.com/schrodinger-devel@lists.sourceforge.net/msg00414.html

That being said, libschroedinger1.0 and liborc0.4 are already available
in Ports.


Yaakov



--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: New (to me) undefined symbol issue when linking
  2011-10-06 17:28 ` Yaakov (Cygwin/X)
@ 2011-10-10 14:06   ` Nathan Thern
  0 siblings, 0 replies; 3+ messages in thread
From: Nathan Thern @ 2011-10-10 14:06 UTC (permalink / raw)
  To: cygwin

On Thu, Oct 6, 2011 at 12:27 PM, Yaakov (Cygwin/X)
<yselkowitz@users.sourceforge.net> wrote:
> It is a known issue that the testsuite does not build with the latest
> orc:

OK, I'll revert to your orc & try from there.

> That being said, libschroedinger1.0 and liborc0.4 are already available
> in Ports.

Yep. Thanks for those, since they were my starting point. I'm trying
to build ffmpeg-0.8.5 & it failed on libschroedinger1.0-1.0.5 with an
undeclared identifier. I figured maybe the latest libschroedinger
would clear that up.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-10 14:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-06 15:18 New (to me) undefined symbol issue when linking Nathan Thern
2011-10-06 17:28 ` Yaakov (Cygwin/X)
2011-10-10 14:06   ` Nathan Thern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).