[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mingw support.
From: |
carlo\.bramix |
Subject: |
Mingw support. |
Date: |
Wed, 24 Feb 2010 21:56:41 +0100 |
Hello,
after an hard work I was able to get an almost working build of the most recent
guile.
In the attached patch there are some little fixes and a bigger one, an almost
complete and working implementation of posix mmap()/munmap() for Windows: this
will allow you a single source code to be easily modified for both POSIX and
WIN32 solutions.
This code has been also tested separately and I have not found any problem.
This patch corrects the most urgent problem but it is not enough for compiling
guile completely working.
I found some difficult problems that I corrected with some hacks into the
source and, obviously, not included in the attached patch.
libguile/dynl.c and libguile/foreing.c generate an error like this one:
../../guile-1.9.8/libguile/dynl.c:304: error: for each function it appears in.)
../../guile-1.9.8/libguile/dynl.c: In function 'scm_dynamic_args_call':
../../guile-1.9.8/libguile/dynl.c:334: error: 'SCM_FOREIGN_TYPE_void' undeclared
(first use in this function)
make[3]: *** [dynl.lo] Error 1
This problem happens because the Windows includes declare the VOID macro to be
an alias of void.
One line of code explains it better:
#define VOID void
So, when combining with ## operator, SCM_FOREIGN_TYPE_ + VOID does not creates
SCM_FOREIGN_TYPE_VOID but SCM_FOREIGN_TYPE_void.
There was no much that I could do to avoid this, except adding an "#undef VOID"
after all inclusions.
After that, I got this error.
libtool: link: gcc -std=gnu99 -Wall -Wmissing-prototypes
-Wdeclaration-after-statement -Wundef -Wswitch-enum -fvisibility=hidden
-Ic:/mingw/include -g -O2 -o .libs/guile_filter_doc_snarfage.exe c-tokenize.o
-Lc:/mingw/lib /mingw/lib/libgc.dll.a /mingw/lib/libatomic_ops.dll.a
/mingw/lib/libregex.dll.a /mingw/lib/libunistring.dll.a
/mingw/lib/libiconv.dll.a -lcrypt -lws2_32 /mingw/lib/libltdl.dll.a -L/mingw/lib
c-tokenize.o: In function `yyalloc':
C:\msys\1.0\home\Carlo\guile\libguile/<stdout>:2177: undefined reference to
`rpl_malloc'
collect2: ld returned 1 exit status
It seems to me that there is a missing libguile.la dependency.
I'm not sure where it would be better to touch, so I hacked generated Makefile
without touching Makefile.am yet.
Anyways, adding libguile.la solved the trouble.
Finally, when all things seemed to work correctly, I got this message when
compiling.
make[2]: Entering directory `/home/Carlo/guile/module'
GUILE_AUTO_COMPILE=0 \
../meta/uninstalled-env \
guile-tools compile -Wunbound-variable -Warity-mismatch -o "ice-9/eval.g
o" "../../guile-1.9.8/module/ice-9/eval.scm"
ERROR: In procedure delete-file:
ERROR: Permission denied
make[2]: *** [ice-9/eval.go] Error 1
Actually, this just means to me that there is at least one file descriptor
still open and valid when _unlink() function is called.
It could be a plain file handle or a memory mapped object.
Have you some suggestions to give me for testing this?
I hope all this will be useful.
Sincerely,
Carlo Bramini.
libguile-1.9.8.txt
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Mingw support.,
carlo\.bramix <=