hatrick on Thu, 8 Feb 2001 10:27:30 +0000 (GMT+00:00)

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: pari & cygwin insurmountable difficulty saga!

Content-type: text/plain

----- Begin Hush Signed Message from hatrick@hushmail.com -----

Hello and many thanks for the fast responses;

I have tried a number of increasingly drastic things in the past hours.
the good news:
i have learned rather more about the pari / cygwin build proc.
also: Iwao's static build suggestion works.

the bad news:
still no joy on building the dll.

i'm afraid i can't find any file where __imp_reent_data is global and *not*
could this be the prob?
Following Gerhard's suggestion I changed Makefile.DLLs to contain

extern __declspec(dllimport) struct _reent reent_data;

in the hope that this might do something. no joy ( see result below).

Sooo any enlightening comments would still be much appreciated.

Thanks & regards,
Kerr Hatrick.

# following is result of replacing appropriate line by
# echo 'extern __declspec(dllimport) struct _reent __imp_reent_data;'		>>
# in makefile.DLLs:

$ make gp
echo EXPORTS > libpari.def
echo libpari_impure_ptr = _impure_ptr >> libpari.def
nm libpari.a | sed -n '/^........ [BCDRT] _/s/[^_]*_//p' >> libpari.def
dlltool                 \
        --def libpari.def                                       \
        --dllname libpari.dll                           \
        --output-exp libpari.exp                                \
        --output-lib libpari_dll.a
echo "/* automatically generated by Makefile.DLLs */"   > libpari_dll.c
echo "void *_impure_ptr;"                               >> libpari_dll.c
/usr/bin/gcc -O3 -DGCC_INLINE -Wall -Wno-implicit       -malign-loops=2
-malign-jumps=2 -malign-functions=2 -fomit-frame-pointer   -I. -I../src/head
ers  -c -o libpari_dll.o libpari_dll.c
/usr/bin/ld -shared -soname libpari.dll  --dll -o libpari.dll
        -e _dll_entry@12                                        \
        libpari.exp libpari.a libpari_dll.o
        dll_init.o dll_fixup.o                                  \
        -L/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-6 -L/usr/lib -L/usr/lib
-lgcc -lcygwin -lkernel32 -lgcc
Cannot export __imp_reent_data: symbol not defined
dll_init.o(.text+0x1):dll_init.c: undefined reference to `__imp_reent_data'
make: *** [libpari.dll] Error 1
rm libpari_dll.c libpari.exp libpari.def libpari_dll.o

# end attempt

At Wed, 7 Feb 2001 17:16:48 +0100 (MET), Gerhard Niklasch <nikl@mathematik.tu-
muenchen.de> wrote:

>In response to:
>> Message-Id: <200102071527.HAA18372@user5.hushmail.com>
>> From: hatrick@hushmail.com
>> Date: Wed, 7 Feb 2001 15:18:28 +0000 (GMT+00:00)
>> Cannot export __imp_reent_data: symbol not defined
>> dll_init.o(.text+0x1):dll_init.c: undefined reference to `__imp_reent_data'
>> Make[1]: *** [libpari.dll] Error 1
>Disclaimer: I know nothing at all about CygWin.
>However, pasting __imp_reent_data into www.google.com came up
>with the following:
>Using your suggestion, I changed the following in src/utils/dllinit.c:
>    extern struct _reent *__imp_reent_data;
>    extern __declspec(dllimport) struct _reent reent_data;
>and the '__imp_reent_data' undefined reference problem was solved.
>dllinit.c is built "on the fly" in a sequence of echo commands
>which come out of config/Makefile.DLLs, at the end:
># Windows requires each DLL to have an initialization function
># that is called at certain points (thread/process attach/detach).
># This one just initializes `_impure_ptr'.
>        echo '#include <stdio.h>'                               > dll_init.c
>        echo 'extern struct _reent *_impure_ptr;'               >> dll_init.c
>        echo 'extern struct _reent *__imp_reent_data;'          >> dll_init.c
>        echo '__attribute__((stdcall))'                         >> dll_init.c
>        echo 'int dll_entry(int handle, int reason, void *ptr)' >> dll_init.c
>        echo '{ _impure_ptr=__imp_reent_data; return 1; }'      >> dll_init.c
># The following rule is just there to convince gcc
># to keep otherwise unused intermediate targets around.
>dont_throw_away: dll_fixup.o dll_init.o
>So you may try changing the third of these echo lines as indicated,
>and rebuild  (I guess you have to re-run the configure phase?).
>(Karim -- any idea whether this change won't break older cygwins?)
>Hope this helps,

----- Begin Hush Signature v1.3 -----
----- End Hush Signature v1.3 -----
\n\nThis message has been signed with a Hush Digital Signature. \nTo verify the signature, please go to www.hush.com/tools\n\n

IMPORTANT NOTICE:  If you are not using HushMail, this message could have been read easily by the many people who have access to your open personal email messages.
Get your FREE, totally secure email address at http://www.hushmail.com.