[Ecls-list] Mingw32 build issues with libffi (libffi issue solved, patch needed, now sockets fails)
Marko Kocić
marko.kocic at gmail.com
Mon Jan 10 16:23:11 UTC 2011
When I manually edited build/Makefile and added -lffi to FASL_LIBS the
build continued.
I can see that it is populated by configure, but I don't know how to
create a patch for this. I suppose -lffi should be added there when
ffi is detected, or maybe the right place is CORE_LIBS?
The build now fails in sockets with the following error:
;;; Invoking external command:
;;; g++ -I. -Ic:/development/cvstree/ecl/build
-Ic:/msys/1.0/local/include
-Ic:/msys/1.0/local/lib/libffi-3.0.9/includ
e -D_THREAD_SAFE -Dmingw32 -Ic:/development/cvstree/ecl/src/c -w -c
c:/development/cvstree/ecl/build/ext/sockets.c -o c:
/development/cvstree/ecl/build/ext/sockets.o
c:/development/cvstree/ecl/build/ext/sockets.c: In function
'cl_lispunion*
L10get_host_by_address(cl_lispunion*)':
c:/development/cvstree/ecl/build/ext/sockets.c:356:42: error: invalid
conversion from 'unsigned char*' to 'const char*'
c:/development/cvstree/ecl/build/ext/sockets.c:356:42: error:
initializing argument 1 of 'hostent* gethostbyaddr(const
char*, int, int)'
c:/development/cvstree/ecl/build/ext/sockets.c: In function
'cl_lispunion* LC18socket_receive(cl_narg, cl_lispunion*, cl
_lispunion*, cl_lispunion*, ...)':
c:/development/cvstree/ecl/build/ext/sockets.c:690:56: error: invalid
conversion from 'void*' to 'char*'
c:/development/cvstree/ecl/build/ext/sockets.c:690:56: error:
initializing argument 2 of 'int recvfrom(SOCKET, char*,
int, int, sockaddr*, int*)'
c:/development/cvstree/ecl/build/ext/sockets.c: In function
'cl_lispunion* LC29socket_send(cl_narg, cl_lispunion*, cl_li
spunion*, cl_lispunion*, ...)':
c:/development/cvstree/ecl/build/ext/sockets.c:1234:48: error: invalid
conversion from 'void*' to 'const char*'
c:/development/cvstree/ecl/build/ext/sockets.c:1234:48: error:
initializing argument 2 of 'int sendto(SOCKET, const ch
ar*, int, int, const sockaddr*, int)'
c:/development/cvstree/ecl/build/ext/sockets.c:1264:40: error: invalid
conversion from 'void*' to 'const char*'
c:/development/cvstree/ecl/build/ext/sockets.c:1264:40: error:
initializing argument 2 of 'int send(SOCKET, const char
*, int, int)'
c:/development/cvstree/ecl/build/ext/sockets.c: In function
'cl_lispunion* LC42socket_bind(cl_narg, cl_lispunion*, ...)'
:
c:/development/cvstree/ecl/build/ext/sockets.c:1747:34: error: invalid
conversion from 'void*' to 'intptr_t'
c:/development/cvstree/ecl/build/ext/sockets.c:1747:34: error:
initializing argument 1 of 'int _open_osfhandle(intptr_
t, int)'
c:/development/cvstree/ecl/build/ext/sockets.c: In function
'cl_lispunion* LC43socket_accept(cl_lispunion*)':
c:/development/cvstree/ecl/build/ext/sockets.c:1779:44: error: invalid
conversion from 'long int' to 'void*'
c:/development/cvstree/ecl/build/ext/sockets.c: In function
'cl_lispunion* LC44socket_connect(cl_narg, cl_lispunion*, ..
.)':
c:/development/cvstree/ecl/build/ext/sockets.c:1863:34: error: invalid
conversion from 'void*' to 'intptr_t'
c:/development/cvstree/ecl/build/ext/sockets.c:1863:34: error:
initializing argument 1 of 'int _open_osfhandle(intptr_
t, int)'
c:/development/cvstree/ecl/build/ext/sockets.c: In function
'cl_lispunion* LC46_setf_non_blocking_mode_(cl_lispunion*, c
l_lispunion*)':
c:/development/cvstree/ecl/build/ext/sockets.c:1909:79: error: invalid
conversion from 'long int' to 'void*'
c:/development/cvstree/ecl/build/ext/sockets.c:1909:79: error:
initializing argument 1 of 'BOOL SetNamedPipeHandleStat
e(void*, DWORD*, DWORD*, DWORD*)'
c:/development/cvstree/ecl/build/ext/sockets.c: In function
'cl_lispunion* LC47socket_close(cl_lispunion*)':
c:/development/cvstree/ecl/build/ext/sockets.c:1939:80: error: invalid
conversion from 'long int' to 'void*'
c:/development/cvstree/ecl/build/ext/sockets.c:1939:80: error:
initializing argument 1 of 'BOOL GetNamedPipeInfo(void*
, DWORD*, DWORD*, DWORD*, DWORD*)'
c:/development/cvstree/ecl/build/ext/sockets.c:1941:84: error: invalid
conversion from 'long int' to 'void*'
c:/development/cvstree/ecl/build/ext/sockets.c:1941:84: error:
initializing argument 1 of 'BOOL DisconnectNamedPipe(vo
id*)'
c:/development/cvstree/ecl/build/ext/sockets.c: In function
'cl_lispunion* L68get_sockopt_int(cl_lispunion*, cl_lispunio
n*, cl_lispunion*)':
c:/development/cvstree/ecl/build/ext/sockets.c:2610:81: error: cannot
convert 'int*' to 'char*' for argument '4' to 'int
getsockopt(SOCKET, int, int, char*, int*)'
c:/development/cvstree/ecl/build/ext/sockets.c: In function
'cl_lispunion* L69get_sockopt_bool(cl_lispunion*, cl_lispuni
on*, cl_lispunion*)':
c:/development/cvstree/ecl/build/ext/sockets.c:2643:88: error: cannot
convert 'int*' to 'char*' for argument '4' to 'int
getsockopt(SOCKET, int, int, char*, int*)'
c:/development/cvstree/ecl/build/ext/sockets.c: In function
'cl_lispunion* L71get_sockopt_linger(cl_lispunion*, cl_lispu
nion*, cl_lispunion*)':
c:/development/cvstree/ecl/build/ext/sockets.c:2690:81: error: cannot
convert 'linger*' to 'char*' for argument '4' to '
int getsockopt(SOCKET, int, int, char*, int*)'
c:/development/cvstree/ecl/build/ext/sockets.c: In function
'cl_lispunion* L72set_sockopt_int(cl_lispunion*, cl_lispunio
n*, cl_lispunion*, cl_lispunion*)':
c:/development/cvstree/ecl/build/ext/sockets.c:2723:84: error: cannot
convert 'int*' to 'const char*' for argument '4' t
o 'int setsockopt(SOCKET, int, int, const char*, int)'
c:/development/cvstree/ecl/build/ext/sockets.c: In function
'cl_lispunion* L73set_sockopt_bool(cl_lispunion*, cl_lispuni
on*, cl_lispunion*, cl_lispunion*)':
c:/development/cvstree/ecl/build/ext/sockets.c:2756:84: error: cannot
convert 'int*' to 'const char*' for argument '4' t
o 'int setsockopt(SOCKET, int, int, const char*, int)'
c:/development/cvstree/ecl/build/ext/sockets.c: In function
'cl_lispunion* L75set_sockopt_linger(cl_lispunion*, cl_lispu
nion*, cl_lispunion*, cl_lispunion*)':
c:/development/cvstree/ecl/build/ext/sockets.c:2808:94: error: cannot
convert 'linger*' to 'const char*' for argument '4
' to 'int setsockopt(SOCKET, int, int, const char*, int)'
Error code 1 when executing
(RUN-PROGRAM "g++" ("-I." "-Ic:/development/cvstree/ecl/build"
"-Ic:/msys/1.0/local/include" "-Ic:/msys/1.0/local/lib/li
bffi-3.0.9/include" "-D_THREAD_SAFE" "-Dmingw32"
"-Ic:/development/cvstree/ecl/src/c" "-w" "-c"
"c:/development/cvstree/
ecl/build/ext/sockets.c" "-o" "c:/development/cvstree/ecl/build/ext/sockets.o"))
Available restarts:
1. (CONTINUE) Continues anyway.
2. (ABORT) ABORT
Top level in: #<process TOP-LEVEL>.
> :r1
;;; Error:
;;; * The C compiler failed to compile the intermediate file.
Cannot find out entry point for binary file BUILD:EXT;SOCKETS.O.NEWEST
No restarts available.
Top level in: #<process TOP-LEVEL>.
> (quit)
Sorry for spamming the list with build errors, but it was a while
since my last successfull build, and I still don't have working ECL on
this box, but it seems that mingw as a platform has its own issues.
Regards,
Marko Kocić
On Mon, Jan 10, 2011 at 10:58 AM, Marko Kocić <marko.kocic at gmail.com> wrote:
> Hi all,
> I'm currently trying to build latest 32bit ecl on mingw with the
> following parameters:
>
> ./configure CFLAGS="-Ic:/msys/1.0/local/include
> -Ic:/msys/1.0/local/lib/libffi-3.0.9/include"
> LDFLAGS="-Lc:/msys/1.0/local/lib" --prefix=c:/opt/ecl --enable-threads
> --enable-unicode --with-cxx --with-system-gmp -enable-boehm=system &&
> make 2>&1 | tee -a build.log
>
> First, I noticed that build process builds libatomic-ops-1.2 from
> src/gc/libatomic_ops-1.2 folder although I specified system-gc in
> configure, and it indeed uses system gc.
>
> I have built an locally installed gmp, gc-7.2alpha4 and libffi-3.0.9.
> Build goes file for some time, but fails when linking ecl_min. I had
> similar problem on gentoo linux where gentoo ebuild was adding
> --as-needed flag which caused the same error, but here I don't have
> anything like that.
>
> I looked at the logs for mingw build on ecl build farm, but seems it
> doesn't use libffi.
>
> I obtained libffi from http://sourceware.org/libffi , is this the correct one?
>
> The error I get is the following. I'm also attaching full build log.
>
> if [ -f CROSS-COMPILER ]; then \
> touch ecl_min.exe; \
> else \
> g++ -Lc:/msys/1.0/local/lib -lffi -o ecl_min.exe
> cinit.o c/all_symbols.o -L./ libeclmin.a -leclatomic
> -lgmp -lgc -lm -lws2_32;\
> fi
> Info: resolving _GC_dont_gc by linking to __imp__GC_dont_gc (auto-import)
> Info: resolving _GC_oom_fn by linking to __imp__GC_oom_fn (auto-import)
> Info: resolving _GC_no_dls by linking to __imp__GC_no_dls (auto-import)
> Info: resolving _GC_all_interior_pointers by linking to
> __imp__GC_all_interior_pointers (auto-import)
> Info: resolving _GC_time_limit by linking to __imp__GC_time_limit (auto-import)
> Info: resolving _GC_push_other_roots by linking to
> __imp__GC_push_other_roots (auto-import)
> Info: resolving _GC_start_call_back by linking to
> __imp__GC_start_call_back (auto-import)
> Info: resolving _GC_java_finalization by linking to
> __imp__GC_java_finalization (auto-import)
> Info: resolving _GC_print_stats by linking to __imp__GC_print_stats
> (auto-importc:/mingw32/bin/../lib/gcc/mingw32/4.5.1/
> ../../../../mingw32/bin/ld.exe: warning: auto-importing has been
> activated without --enable-auto-import specified on the
> command line.
> This should work unless it involves constant data structures
> referencing symbols from auto-imported DLLs.
> libeclmin.a(ffi.o):tmp.c:(.text+0x169a): undefined reference to `ffi_prep_cif'
> libeclmin.a(ffi.o):tmp.c:(.text+0x17da): undefined reference to `ffi_call'
> libeclmin.a(ffi.o):tmp.c:(.text+0x1ad4): undefined reference to
> `ffi_prep_closure'
> libeclmin.a(ffi.o):tmp.c:(.data+0x20): undefined reference to `ffi_type_sint8'
> libeclmin.a(ffi.o):tmp.c:(.data+0x24): undefined reference to `ffi_type_uint8'
> libeclmin.a(ffi.o):tmp.c:(.data+0x28): undefined reference to `ffi_type_sint8'
> libeclmin.a(ffi.o):tmp.c:(.data+0x2c): undefined reference to `ffi_type_uint8'
> libeclmin.a(ffi.o):tmp.c:(.data+0x30): undefined reference to `ffi_type_sint16'
> libeclmin.a(ffi.o):tmp.c:(.data+0x34): undefined reference to `ffi_type_uint16'
> libeclmin.a(ffi.o):tmp.c:(.data+0x38): undefined reference to `ffi_type_sint32'
> libeclmin.a(ffi.o):tmp.c:(.data+0x3c): undefined reference to `ffi_type_uint32'
> libeclmin.a(ffi.o):tmp.c:(.data+0x40): undefined reference to `ffi_type_sint32'
> libeclmin.a(ffi.o):tmp.c:(.data+0x44): undefined reference to `ffi_type_uint32'
> libeclmin.a(ffi.o):tmp.c:(.data+0x48): undefined reference to `ffi_type_sint8'
> libeclmin.a(ffi.o):tmp.c:(.data+0x4c): undefined reference to `ffi_type_uint8'
> libeclmin.a(ffi.o):tmp.c:(.data+0x50): undefined reference to `ffi_type_sint16'
> libeclmin.a(ffi.o):tmp.c:(.data+0x54): undefined reference to `ffi_type_uint16'
> libeclmin.a(ffi.o):tmp.c:(.data+0x58): undefined reference to `ffi_type_sint32'
> libeclmin.a(ffi.o):tmp.c:(.data+0x5c): undefined reference to `ffi_type_uint32'
> libeclmin.a(ffi.o):tmp.c:(.data+0x60): undefined reference to `ffi_type_sint64'
> libeclmin.a(ffi.o):tmp.c:(.data+0x64): undefined reference to `ffi_type_uint64'
> libeclmin.a(ffi.o):tmp.c:(.data+0x68): undefined reference to `ffi_type_sint64'
> libeclmin.a(ffi.o):tmp.c:(.data+0x6c): undefined reference to `ffi_type_uint64'
> libeclmin.a(ffi.o):tmp.c:(.data+0x70): undefined reference to `ffi_type_pointer'
> libeclmin.a(ffi.o):tmp.c:(.data+0x74): undefined reference to `ffi_type_pointer'
> libeclmin.a(ffi.o):tmp.c:(.data+0x78): undefined reference to `ffi_type_pointer'
> libeclmin.a(ffi.o):tmp.c:(.data+0x7c): undefined reference to `ffi_type_float'
> libeclmin.a(ffi.o):tmp.c:(.data+0x80): undefined reference to `ffi_type_double'
> libeclmin.a(ffi.o):tmp.c:(.data+0x84): undefined reference to `ffi_type_void)
> '
> collect2: ld returned 1 exit status
> make[1]: *** [ecl_min.exe] Error 1
> make[1]: Leaving directory `/c/development/cvstree/ecl/build'
> make: *** [all] Error 2
>
> c:\development\cvstree\ecl>
>
More information about the ecl-devel
mailing list