public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Dr. Volker Zell" <Dr.Volker.Zell@oracle.com>
To: Mumit Khan <khan@NanoTech.Wisc.EDU>
Cc: cygwin@cygwin.com, GMBenoit@Wanadoo.fr
Subject: undefined reference to signgam and plotutils-2.4.1
Date: Tue, 23 Jan 2001 05:46:00 -0000	[thread overview]
Message-ID: <kv4ryqz8cc.fsf@vzell.de.oracle.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3220 bytes --]

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

configure set these variables but they cause problems during compilation.

plotutils-2.4.1 passes all the tests.

Also

 o pstoedit-3.21 - http://www.geocities.com/SiliconValley/Network/1958/pstoedit/

which depends on plotutils compiles fine and works.

diff -upr /gnu/plotutils-2.4.1/ode/specfun.c plotutils-2.4.1/ode/specfun.c
--- /gnu/plotutils-2.4.1/ode/specfun.c	Sun May 30 21:20:53 1999
+++ plotutils-2.4.1/ode/specfun.c	Tue Jan 23 13:22:21 2001
@@ -82,7 +82,12 @@ 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
+#ifdef __CYGWIN__
+extern __IMPORT struct _reent reent_data;
+#define signgam reent_data._new._reent._gamma_signgam
+#else
 extern int SIGNGAM;
+#endif
 #endif
 double f_gamma ____P((double x));
 
Ciao
  Volker


-- 
___________________________________________________________________________

   "Is a dream a lie if it don't come true or is it something worse ..."

                                              Dr. Volker Zell
      __ /  _  /  __  / ___/  /    ___/       -- Senior Dozent --
     /  /  /__/  /_  / /     /    __/         Geschäftsstelle Düsseldorf
   ____/__/ _|__/ __/____/ ____/____/         Hamborner Str. 51
                                              D-40472 Düsseldorf
   e-Mail: mailto:Dr.Volker.Zell@oracle.com
   WWW:    http://ciko.de.oracle.com/   (Intranet)
   Tel:    (+49) 211-74839-414                   
   Fax:    (+49) 211-74839-44
___________________________________________________________________________


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

             reply	other threads:[~2001-01-23  5:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-23  5:46 Dr. Volker Zell [this message]
2001-01-23 13:01 ` Earnie Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=kv4ryqz8cc.fsf@vzell.de.oracle.com \
    --to=dr.volker.zell@oracle.com \
    --cc=GMBenoit@Wanadoo.fr \
    --cc=cygwin@cygwin.com \
    --cc=khan@NanoTech.Wisc.EDU \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).