From: shookie@email.de
To: Andy Wingo <wingo@pobox.com>
Cc: "Ludovic Courtès" <ludo@gnu.org>, 13848@debbugs.gnu.org
Subject: bug#13848: Statically linking guile-2.0.
Date: Sun, 10 Mar 2013 19:54:22 +0100 [thread overview]
Message-ID: <70756B90-0AA4-44C7-AA56-AB726F1DE1A2@email.de> (raw)
In-Reply-To: <87hakjxish.fsf@pobox.com>
On 10.03.2013, at 18:32, Andy Wingo <wingo@pobox.com> wrote:
> Hi :)
>
> On Sun 10 Mar 2013 05:09, shookie@email.de writes:
>
>> The struct timespec is still an issue in a mingw build on windows, but
>> I know how to handle it.
>
> How do you handle it, for the record?
by adding
#ifndef _TIMESPEC_DEFINED
struct timespec {
time_t tv_sec;
long tv_nsec;
};
#endif
to lib/stat-time.h and libguile/threads.c. Don't particularly like it, but that's what works. If you don't wanna make that part of the main source tree, I got no problem making a patch part of my build process. I gotta do some patching anyway to be able to have relative/runtime initialized load paths on windows.
>
> I assume you are using pthreads-w32?
/* This is an implementation of the threads API of POSIX 1003.1-2001.
*
* --------------------------------------------------------------------------
*
* Pthreads-win32 - POSIX Threads Library for Win32
* Copyright(C) 1998 John E. Bossom
* Copyright(C) 1999,2005 Pthreads-win32 contributors
*
* Contact Email: rpj@callisto.canberra.edu.au
That's what the pthread.h says.
>
>> As I said, I build everything on windows.
>>
>> I have to build bdw-gc with --enable-threads=posix. If I don't, I get errors along this line:
>>
>> ./.libs/libguile-2.0.a(libguile_2.0_la-threads.o):threads.c:(.text+0xfb8): undefined reference to `GC_pthread_detach'
>> ./.libs/libguile-2.0.a(libguile_2.0_la-threads.o):threads.c:(.text+0x10de): undefined reference to `GC_pthread_create'
>> ./.libs/libguile-2.0.a(libguile_2.0_la-threads.o):threads.c:(.text+0x1221): undefined reference to `GC_pthread_detach'
>> ./.libs/libguile-2.0.a(libguile_2.0_la-threads.o):threads.c:(.text+0x12d1): undefined reference to `GC_pthread_create'
>
> You can build bdw-gc without threads, and then build Guile without
> threads. In my builds I was doing --enable-threads=posix.
>
>> The problem is, when I do build bdw-gc with posix threads, the guile
>> module compiling is all broken, it periodically drops messages like
>> this:
>>
>> GUILEC ice-9/eval.go
>> Backtrace:
>> In unknown file:
>> ?: 3 [apply-smob/1 #<boot-closure 192c100 (_ _ _)> #t ...]
>> ?: 2 [apply-smob/1 #<catch-closure 1ccee70>]
>> ?: 1 [primitive-eval ((@ # %) (begin # # #))]
>> ?: 0 [chmod #<closed: file 0> 438]
>
> You passed the `GEN guile-procedures.texi' phase? If so, things are
> already going well. That's the first time the newly built Guile is
> used, and if it went through it means at least you have a functional
> Guile.
>
> This problem sounds similar to something Eli Zaretskii reported:
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10474#14:
>
> The next problem is here:
>
> GUILEC ice-9/eval.go
> Backtrace:
> In unknown file:
> ?: 5 [boot-closure #t #<catch-closure 231fd40> ...]
> ?: 4 [catch-closure]
> ?: 3 [primitive-eval ((@ # %) (begin # # #))]
> ?: 2 [chmod #<input-output: ice-9/eval.go.9IiPxC 6> 438]
> ?: 1 [boot-closure system-error "chmod" ...]
> ?: 0 [delete-file "ice-9/eval.go.9IiPxC"]
>
> ERROR: In procedure delete-file:
> ERROR: In procedure delete-file: Permission denied
>
> This happens because Guile calls fchmod, which is #define'd to -1 on
> MinGW.
>
> However the code is different now, than it was when Eli made his report;
> now if you don't have fchmod (as mingw does not), chmod only accepts
> strings -- and here it seems that we are trying to chmod a port. I will
> see what I can do here.
Sounds promising!
Regards
Jan Schukat
P.S. I guess I append some more info, namely my configure command line, and the most interesting build output section (after that its mostly backtraces from guile compiling):
./configure --prefix=/c/Users/shookie/guiletest/lib --disable-shared --disable-fast-install --with-gnu-ld --disable-deprecated --enable-nls --with-libgmp-prefix=/c/Users/shookie/guiletest/lib LIBFFI_CFLAGS='-I/c/Use
rs/shookie/guiletest/lib/lib/libffi-3.0.12/include' LIBFFI_LIBS='-lffi' BDW_GC_LIBS='-lgc' BDW_GC_CFLAGS='-I/c/Users/shookie/guiletest/lib' CPPFLAGS='-D HAVE_GC_SET_FINALIZER_NOTIFIER -D HAVE_GC_GET_FREE_SPACE_DIVISOR -D HAVE_GC_GET_HEAP
_USAGE_SAFE -D HAVE_GC_SET_FINALIZE_ON_DEMAND' CFLAGS='-s' && make install
….
CC libguile_2.0_la-threads.lo
threads.c: In function 'scm_pthread_cond_timedwait':
threads.c:2006:3: warning: passing argument 3 of 'pthread_cond_timedwait' from incompatible pointer type [enabled by default]
In file included from ../lib/time.h:369:0,
from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/sys/time.h:3,
from ../lib/sys/time.h:30,
from ../libguile/scmconfig.h:26,
from ../libguile/bdw-gc.h:24,
from threads.c:27:
c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/pthread.h:1097:31: note: expected 'const struct timespec *' but argument is of type 'const struct scm_t_timespec *'
CC libguile_2.0_la-throw.lo
CC libguile_2.0_la-trees.lo
CC libguile_2.0_la-uniform.lo
CC libguile_2.0_la-values.lo
CC libguile_2.0_la-variable.lo
CC libguile_2.0_la-vectors.lo
CC libguile_2.0_la-version.lo
CC libguile_2.0_la-vm.lo
CC libguile_2.0_la-vports.lo
CC libguile_2.0_la-weaks.lo
CCLD libguile-2.0.la
libtool: link: warning: library `c:/mingw/lib/libunistring.la' was moved.
copying selected object files to avoid basename conflicts...
CC guile-guile.o
CCLD guile.exe
libtool: link: warning: library `c:/mingw/lib/libunistring.la' was moved.
GEN guile-procedures.texi
rm -f guile-procedures.txt
makeinfo --force -o guile-procedures.txt guile-procedures.texi || test -f guile-procedures.txt
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:10246: Cross reference to nonexistent node `Backslash Escapes' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:9941: Cross reference to nonexistent node `Network Address Conversion' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:9880: Cross reference to nonexistent node `Network Databases' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:9830: Cross reference to nonexistent node `Network Databases' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:9304: Cross reference to nonexistent node `Hash Tables' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:9297: Cross reference to nonexistent node `Hash Tables' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:9290: Cross reference to nonexistent node `Hash Tables' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:9204: Cross reference to nonexistent node `File Ports' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:8569: Cross reference to nonexistent node `Vtables' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:8187: Cross reference to nonexistent node `Locales' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:8006: Cross reference to nonexistent node `Bitwise Operations' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:6697: Cross reference to nonexistent node `Character Sets' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:6675: Cross reference to nonexistent node `Character Sets' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:6619: Cross reference to nonexistent node `Multiple Values' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:5563: Cross reference to nonexistent node `File Ports' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:5272: Cross reference to nonexistent node `Ports and File Descriptors' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:5261: Cross reference to nonexistent node `Ports and File Descriptors' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:5250: Cross reference to nonexistent node `Ports and File Descriptors' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:3319: Cross reference to nonexistent node `File Ports' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:3126: Cross reference to nonexistent node `Locales' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:2797: Cross reference to nonexistent node `Hash Tables' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:2790: Cross reference to nonexistent node `Hash Tables' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:2783: Cross reference to nonexistent node `Hash Tables' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:2213: Cross reference to nonexistent node `Character Encoding of Source Files' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:2207: Cross reference to nonexistent node `Ports and File Descriptors' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:2189: Cross reference to nonexistent node `Ports and File Descriptors' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:1575: Cross reference to nonexistent node `Ports and File Descriptors' (perhaps incorrect sectioning?).
/c/Users/shookie/guiletest/lib/guile-2.0/libguile//guile-procedures.texi:1563: Cross reference to nonexistent node `Closing' (perhaps incorrect sectioning?).
make[5]: Entering directory `/c/Users/shookie/guiletest/lib/guile-2.0/libguile'
/bin/mkdir -p '/c/Users/user/guiletest/lib/lib'
next prev parent reply other threads:[~2013-03-10 18:54 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-01 16:19 bug#13848: Statically linking guile-2.0 Jan Schukat
2013-03-02 15:28 ` Ludovic Courtès
2013-03-03 23:20 ` Jan Schukat
2013-03-05 0:54 ` Jan Schukat
2013-03-05 10:22 ` Ludovic Courtès
2013-03-05 15:44 ` Jan Schukat
2013-03-05 17:25 ` Ludovic Courtès
2013-03-05 22:25 ` Jan Schukat
2013-03-06 23:12 ` Ludovic Courtès
2013-03-09 13:44 ` Jan Schukat
2013-03-09 23:06 ` Andy Wingo
2013-03-09 23:57 ` shookie
2013-03-10 4:09 ` shookie
2013-03-10 17:32 ` Andy Wingo
2013-03-10 18:54 ` shookie [this message]
2013-03-10 19:23 ` Andy Wingo
2013-03-10 21:17 ` shookie
2013-03-10 22:03 ` shookie
2013-03-10 22:53 ` Andy Wingo
2013-03-11 0:07 ` shookie
2013-03-11 1:43 ` shookie
2013-03-11 8:26 ` Andy Wingo
2013-03-11 9:30 ` shookie
2013-03-13 9:30 ` Andy Wingo
2013-03-13 19:04 ` bug#13848: Aw: " Jan Schukat
2013-03-16 1:36 ` Jan Schukat
2013-03-29 19:35 ` Ludovic Courtès
2013-03-30 0:20 ` Jan Schukat
2013-03-30 21:27 ` Ludovic Courtès
2013-04-05 23:14 ` Jan Schukat
2013-04-07 10:20 ` Ludovic Courtès
2013-04-07 16:20 ` bug#13848: Aw: " Jan Schukat
2013-04-07 18:22 ` Andy Wingo
2013-04-07 19:18 ` bug#13848: Aw: " Jan Schukat
2013-04-07 20:00 ` Ludovic Courtès
2013-04-07 21:06 ` bug#13848: Aw: " Jan Schukat
2013-04-08 7:48 ` Ludovic Courtès
2013-03-10 17:38 ` shookie
2013-03-10 17:38 ` shookie
2013-03-14 13:54 ` Ludovic Courtès
2013-03-09 9:32 ` Andy Wingo
2013-03-09 15:42 ` Jan Schukat
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=70756B90-0AA4-44C7-AA56-AB726F1DE1A2@email.de \
--to=shookie@email.de \
--cc=13848@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=wingo@pobox.com \
/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).