This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: Question about clisp version naming
- From: Ken Brown <kbrown at cornell dot edu>
- To: cygwin-apps at cygwin dot com
- Date: Tue, 17 Mar 2015 20:54:12 -0400
- Subject: Re: Question about clisp version naming
- Authentication-results: sourceware.org; auth=none
- References: <5500B536 dot 4050108 at cornell dot edu> <87bnju6wox dot fsf at Rainer dot invalid> <5505C36F dot 5030802 at cornell dot edu> <1426443595 dot 8104 dot 9 dot camel at cygwin dot com> <5505D57C dot 3040005 at cornell dot edu> <87twxm5azp dot fsf at Rainer dot invalid> <55060BF6 dot 80801 at cornell dot edu> <87k2ygbw7v dot fsf at Rainer dot invalid> <87fv94bveq dot fsf at Rainer dot invalid> <87bnjsbuhm dot fsf at Rainer dot invalid> <55073E93 dot 2030902 at cornell dot edu> <87vbhzph1g dot fsf at Rainer dot invalid> <5508998A dot 6040903 at cornell dot edu> <1426628400 dot 12464 dot 38 dot camel at cygwin dot com> <5508AD6F dot 60309 at cornell dot edu> <5508C42B dot 6030804 at dronecode dot org dot uk>
On 3/17/2015 8:17 PM, Jon TURNEY wrote:
On 17/03/2015 22:40, Ken Brown wrote:
Yes. But that makes me wonder if I made things too complicated and
could have avoided building lisp.dll. The native Windows build of clisp
creates a lisp.def file, containing the symbols of lisp.exe, and it just
adds "lisp.def" to the gcc command line when building the modules. But
that didn't work on Cygwin; the linker complained that it didn't know
what lisp.def was, and it tried to interpret it as a linker script. Is
there a way to make this approach work?
I seem to recall that you can't have any comments at the start of the
module definition file for ld to recognize it as one.
It didn't occur to me to check the syntax of the def file, although it
should have (see below). The one produced by the build (before I
changed the approach) starts like this:
EXPORTS
IMPORTS
lisp.exe.time_t_from_filetime
lisp.exe.time_t_to_filetime
lisp.exe.fd_read
And the gcc command line with error message is:
gcc -ggdb -O2 -pipe -Wimplicit-function-declaration -W -Wswitch
-Wcomment -Wpointer-arith -Wreturn-type -Wmissing-declarations
-Wimplicit -Wno-sign-compare -Wno-format-nonliteral -O
-falign-functions=4 -DENABLE_UNICODE -DDYNAMIC_MODULES -DDLL_EXPORT
-DPIC -Wl,--stack,0x800000 -Wl,--export-all-symbols modules.o calls.o
bogomips.o -lcrypt -luser32 -lole32 -loleaut32 -L/usr/lib/w32api -luuid
-lversion gettext.o lisp.a lisp.def libgnu.a /usr/lib/libintl.dll.a
/usr/lib/libreadline.dll.a -lncurses /usr/lib/libiconv.dll.a -o lisp.exe
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/../../../../x86_64-pc-cygwin/bin/ld:
lisp.def:3: syntax error
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/../../../../x86_64-pc-cygwin/bin/ld:lisp.def:
file format not recognized; treating as linker script
Having just (!) noticed that this says there's a syntax error in line 3,
I tried deleting line 2. This resulted in a slew of errors like this:
calls.o: In function `error_OS_stream':
/home/kbrown/src/cygclisp/clisp-2.49-4.20150312hg15611.x86_64/src/clisp/modules/syscalls/calls.c:183:
undefined reference to `__imp_OS_error'
/home/kbrown/src/cygclisp/clisp-2.49-4.20150312hg15611.x86_64/src/clisp/modules/syscalls/calls.c:183:(.text+0x11d):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`__imp_OS_error'
Next I tried deleting line 1 instead. This time the linking completed.
But when I ran the resulting executable, I got this:
$ ./lisp.exe --version
module 'syscalls' requires package OS.
That's the same error Achim reported.
I'm stumped. There must be a way around this, but I don't know enough
about .def files to know what else to try.
Ken