From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31217 invoked by alias); 6 Oct 2011 15:18:32 -0000 Received: (qmail 31208 invoked by uid 22791); 6 Oct 2011 15:18:31 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_LR X-Spam-Check-By: sourceware.org Received: from mail-yx0-f171.google.com (HELO mail-yx0-f171.google.com) (209.85.213.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Oct 2011 15:18:12 +0000 Received: by yxt3 with SMTP id 3so3319002yxt.2 for ; Thu, 06 Oct 2011 08:18:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.76.136 with SMTP id b8mr4170971yhe.9.1317914291691; Thu, 06 Oct 2011 08:18:11 -0700 (PDT) Received: by 10.236.109.175 with HTTP; Thu, 6 Oct 2011 08:18:11 -0700 (PDT) Date: Thu, 06 Oct 2011 15:18:00 -0000 Message-ID: Subject: New (to me) undefined symbol issue when linking From: Nathan Thern To: cygwin Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-10/txt/msg00107.txt.bz2 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