* wip-mingw with x86_64 support updated for 3.0.8
@ 2022-05-11 21:45 Jan Nieuwenhuizen
2022-05-16 18:28 ` Jan Nieuwenhuizen
0 siblings, 1 reply; 2+ messages in thread
From: Jan Nieuwenhuizen @ 2022-05-11 21:45 UTC (permalink / raw)
To: guile-devel
Hi!
I've reset and updated wip-mingw onto latest main:
https://git.savannah.gnu.org/cgit/guile.git/log/?h=wip-mingw
Most changes are simply a continuation of the previous
x86_64-w64-mingw32 work done for 3.0.7, using intptr_t and uintptr_t
instead of scm_t_inum or long and unsigned long.
There's one new problem though, the fix I made to determine
file-name-convention correctly when (cross)compiling and when running
now does not work anymore.
FIXME in 3.0.7, this works:
;; boot-9.scm
(define (compile-time-file-name-convention)
(let ((target ((@ (system base target) target-type))))
(cond ((equal? target %host-type)
(system-file-name-convention))
((string-contains-ci target "mingw")
'windows)
(else
'posix)))))
in 3.0.8 it aborts hard.
guile: uncaught exception:
Unbound variable:define-module
Cannot exit gracefully when init is in progress; aborting.
Anyway, I gave up and changed it back to 'posix always using this hack:
(let ((target (or "FIXME" ((@ (system base target) target-type)))))
with a MinGW-specific for cross-compiling to MinGW to 'windows always:
(let ((target (or "mingw" "FIXME" ((@ (system base target) target-type)))))
Ugh. Ideas for a proper fix much appreciated!
Other than that, guile-mingw can still be built by doing
GUIX_PACKAGE_PATH=guix guix build guile-mingw
Greetings,
Janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://lilypond.org
Freelance IT https://JoyOfSource.com | Avatar® https://AvatarAcademy.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: wip-mingw with x86_64 support updated for 3.0.8
2022-05-11 21:45 wip-mingw with x86_64 support updated for 3.0.8 Jan Nieuwenhuizen
@ 2022-05-16 18:28 ` Jan Nieuwenhuizen
0 siblings, 0 replies; 2+ messages in thread
From: Jan Nieuwenhuizen @ 2022-05-16 18:28 UTC (permalink / raw)
To: guile-devel
Jan Nieuwenhuizen writes:
Hello again,
> I've reset and updated wip-mingw onto latest main:
>
> https://git.savannah.gnu.org/cgit/guile.git/log/?h=wip-mingw
If you tried this with a recent Guix, you probably got a segfault. I
finally found that compiling with -flto (--enable-lto) creates broken
DLLs with binutils > 2.35.2. This is "fixed" by using --disable-lto
when compiling for mingw.
So, also with a recent Guix, this should work:
WINEPATH=$(guix shell wine64 -- winepath -w \
$(echo $(guix gc -R \
$(GUIX_PACKAGE_PATH=guix guix build \
--target=x86_64-w64-mingw32 guile-mingw))) \
| sed 's,$,/bin,g' | tr '\n' ';') \
guix shell wine64 -- wine \
$(GUIX_PACKAGE_PATH=guix guix build --target=x86_64-w64-mingw32 \
guile-mingw)/bin/guile.exe \
-c '(format #t "Hello ~a world!\n" %host-type)'
Greetings,
Janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://lilypond.org
Freelance IT https://JoyOfSource.com | Avatar® https://AvatarAcademy.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-16 18:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-11 21:45 wip-mingw with x86_64 support updated for 3.0.8 Jan Nieuwenhuizen
2022-05-16 18:28 ` Jan Nieuwenhuizen
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).