delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/23/16:06:40

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Apparently-From: <earnie?boyd AT yahoo DOT com>
Message-ID: <3A6DF158.B5862D98@yahoo.com>
Date: Tue, 23 Jan 2001 16:02:16 -0500
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: Earnie Boyd <cygwin AT cygwin DOT com>
X-Mailer: Mozilla 4.76 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: "Dr. Volker Zell" <Dr DOT Volker DOT Zell AT oracle DOT com>
CC: Mumit Khan <khan AT NanoTech DOT Wisc DOT EDU>, cygwin AT cygwin DOT com,
GMBenoit AT Wanadoo DOT fr
Subject: Re: undefined reference to signgam and plotutils-2.4.1
References: <kv4ryqz8cc DOT fsf AT vzell DOT de DOT oracle DOT com>

"Dr. Volker Zell" wrote:
> 
> >>On Sun, 21 Jan 2001, Jerome BENOIT wrote:
> >>
> >>> dllwrap --dllname Math.dll --driver-name gcc --dlltool dlltool
> >>> --export-all-symb
> >>> ols --as as --output-def libMath.def --output-lib libMath.a \
> >>>  -s -L/usr/local/lib Math.o blas.o eigens.o ndtri.o quiet_nan.o cpoly.o
> >>> simq.o s
> >>> vd.o const.o mtherr.o polevl.o
> >>> /usr/lib/perl5/5.6.1/cygwin/CORE/libperl5_6_1.a -
> >>> L/usr/lib -lm
> >>> dllwrap: no export definition file provided
> >>> dllwrap: creating one, but that may not be what you want
> >>> Math.o(.text+0xb8c2):Math.c: undefined reference to `signgam'
> >>[ ... ]
> >>
> >>It's a bug in newlib (Cygwin's C library) math.h header. The variable
> >>signgam was changed to a macro, but the header file doesn't show that.
> >>
> >>Please add the following 2 lines *before* signgam is used in the sources
> >>(use grep to find out), and if it works, I'll work up a patch after
> >>I figure out the right way to do this.
> >>
> >>extern __IMPORT struct _reent reent_data;
> >>#define signgam reent_data._new._reent._gamma_signgam
> >>

I added an initialization of signgam to Cygwin and then modified the
cygwin.din to export signgam.

> >>Regards,
> >>Mumit
> >>
> 
> I had the same problem when compiling
> 
>  o plotutils-2.4.1 - http://www.gnu.org/software/plotutils/plotutils.html -
>    ftp://prep.ai.mit.edu/pub/gnu/plotutils/
> 
> There was an undefined reference to signgam too.
> After applying your suggestion to the offending file (see the patch below)
> plotutils-2.4.1 compiles almost OOTB.
> I had to manually comment out the following definitions in the config.h file:
> 
> #define PTHREAD_SUPPORT 1
> #define X_THREAD_SUPPORT 1
> #define HAVE_PTHREAD_H 1
> 

This has nothing at all to do with pthreads other than it causes the
variable to be used.  To fix the plotutils code I did:

$ diff -u3pb ./specfun.c.old ../ode/specfun.c
--- ./specfun.c.old     Tue Jan 23 15:56:17 2001
+++ ../ode/specfun.c    Tue Jan 23 15:56:26 2001
@@ -82,7 +82,9 @@ static double lgamneg ____P((double x));
 static double lgampos ____P((double x));
 #else  /* not NO_SYSTEM_GAMMA, we link in vendor code */
 #define SIGNGAM signgam
+#ifndef __CYGWIN__
 extern int SIGNGAM;
+#endif
 #endif
 double f_gamma ____P((double x));

This leaves the definition in the header.

> configure set these variables but they cause problems during compilation.
> 
> plotutils-2.4.1 passes all the tests.
> 

I haven't gotten that far.  I don't have all of the X libraries in place
yet.  But, I'm getting there.

Cheers,
Earnie.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019