6 Oct 2024 |
srasu | ok, now I'm back to more or less where I was, the environment builds and compilation works fine, but it can't link because it's missing the output of BlocksRuntime, so I just need to figure out the best way to make sure that gets properly set up for the windows build to produce the right thing | 18:03:27 |
Artturin | The package uses a revision from 2014 | 18:04:30 |
Artturin | https://github.com/mackyle/blocksruntime/commit/c524e1747f546e7b2c215e7a063699b11bb96685 | 18:04:35 |
Artturin | Maybe you need this | 18:04:38 |
Artturin | well you override already | 18:04:45 |
Artturin | nvm | 18:04:45 |
srasu | Yeah, I've got it updated to the latest version and I'm getting it set up, the main issue is just making sure that it's producing the right kind of library that my makefiles expect, and that clang finds it, seeing as I'm always double-checking myself to see if it needs something like BlocksRuntime.dll or libBlocksRuntime.so or whatever when it's cross compiled | 18:05:29 |
Artturin | I doubt the person who created this thought about windows at all | 18:06:20 |
Artturin | Homemade build scripts | 18:06:35 |
srasu | I've gotten it to build and work under wine on arch | 18:06:49 |
Artturin | In reply to @artturin:matrix.org https://github.com/mackyle/blocksruntime/commit/c524e1747f546e7b2c215e7a063699b11bb96685 The package doens't build/install .so by default | 18:10:19 |
Artturin | https://github.com/NixOS/nixpkgs/pull/346913 | 18:18:14 |
srasu | thanks! | 18:18:25 |
srasu | I'm adding an override to the build and install steps to pass -shared which does install the .so | 18:18:36 |
Artturin | There is a difference in the shared lib when using gcc vs clang | 18:18:38 |
Artturin | Dunno if it's meaningful | 18:19:13 |
Artturin | * There are differences in the shared lib when using gcc vs clang | 18:19:30 |
Artturin | If it doesn't work then just override the stdenv on your end | 18:20:19 |
srasu | Ok, looks like I got it working! It's really strange though that it always seems that it wants there to be a libBlocksRuntime.so that symlinks the BlocksRuntime.dll that the linker wants | 18:25:30 |
srasu | Thanks so much for your help Artturin ! You've gotten me set straight with a working build in a couple of hours when I've spent weeks trying to get it working before. | 18:33:14 |
Artturin | You're welcome | 18:36:26 |
srasu | Redacted or Malformed Event | 18:57:45 |
srasu | Redacted or Malformed Event | 20:06:04 |
srasu | Redacted or Malformed Event | 20:06:44 |
Artturin | srasu: Maybe you can improve upstreams builds system? This is what a usual output looks like for a autoconf library on mingw
speex
$ tree result
result
├── bin
│ └── libspeex-1.dll
└── lib
├── libspeex.dll.a
└── libspeex.la
| 21:27:48 |
Artturin | Or maybe simply substitute the .so in the build scripts with stdenv.hostPlatform.extensions.library
nix-repl> pkgsCross.mingwW64.libblocksruntime.stdenv.hostPlatform.extensions
{
executable = ".exe";
library = ".dll";
sharedLibrary = ".dll";
staticLibrary = ".lib";
}
| 21:30:35 |
Artturin | windows.libgnurx
result
├── bin
│ └── libgnurx-0.dll
├── include
│ └── regex.h
├── lib
│ ├── libgnurx.dll.a
│ └── libregex.a
└── share
└── man
├── man3
│ └── regex.3.gz
└── man7
└── regex.7.gz
| 21:33:26 |
Artturin | It's build log
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/wbiaws7m5skamns5n5kc1xx3c83lkzap-mingw-libgnurx-2.5.1-src.tar.gz
source root is mingw-libgnurx-2.5.1
setting SOURCE_DATE_EPOCH to timestamp 1178567546 of file mingw-libgnurx-2.5.1/configure
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
patching script interpreter paths in ./configure
./configure: interpreter directive changed from "#! /bin/sh" to "/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/sh"
configure flags: --prefix=/nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1 --build=x86_64-unknown-linux-gnu --host=x86_64-w64-mingw32
checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-w64-mingw32-gcc accepts -g... yes
checking for x86_64-w64-mingw32-gcc option to accept ANSI C... none needed
checking whether x86_64-w64-mingw32-gcc accepts the -mthreads option... yes
checking whether x86_64-w64-mingw32-gcc accepts the -mtune=pentium3 option... no
checking for x86_64-w64-mingw32-lib... no
checking for lib... no
configure: creating ./config.status
config.status: creating Makefile
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: SHELL=/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
x86_64-w64-mingw32-gcc -mthreads -g -O2 -I . -c -o regex.o regex.c
In file included from [01m[Kregex.c:61[m[K:
[01m[Kregex_internal.h:424:[m[K [01;35m[Kwarning: [m[K"alloca" redefined
424 | # define alloca(size) __builtin_alloca (size)
|
In file included from [01m[K/nix/store/vchms9s5n98gp5fglxpvm5r3p9if4zf1-x86_64-w64-mingw32-gcc-13.3.0/x86_64-w64-mingw32/sys-include/stdlib.h:770[m[K,
from [01m[Kregex_internal.h:27[m[K:
[01m[K/nix/store/vchms9s5n98gp5fglxpvm5r3p9if4zf1-x86_64-w64-mingw32-gcc-13.3.0/x86_64-w64-mingw32/sys-include/malloc.h:164:[m[K [01;36m[Knote: [m[Kthis is the location of the previous definition
164 | #define alloca(x) __builtin_alloca((x))
|
In file included from [01m[Kregex.c:64[m[K:
[01m[Kregcomp.c:[m[K In function '[01m[Kparse_dup_op[m[K':
[01m[Kregcomp.c:2513:39:[m[K [01;35m[Kwarning: [m[Kcast to pointer from integer of different size [[01;35m[K]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-to-pointer-cast-Wint-to-pointer-cast]8;;[m[K]
2513 | postorder (elem, mark_opt_subexp, [01;35m[K([m[Kvoid *) (long) elem->token.opr.idx);
| [01;35m[K^[m[K
[01m[Kregcomp.c:[m[K In function '[01m[Kmark_opt_subexp[m[K':
[01m[Kregcomp.c:3725:19:[m[K [01;35m[Kwarning: [m[Kcast from pointer to integer of different size [[01;35m[K]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wpointer-to-int-cast-Wpointer-to-int-cast]8;;[m[K]
3725 | int idx = (int) [01;35m[K([m[Klong) extra;
| [01;35m[K^[m[K
x86_64-w64-mingw32-gcc -mthreads -g -O2 -I . -shared -o libgnurx-0.dll -Wl,--enable-auto-image-base -Wl,--out-implib,libgnurx.dll.a regex.o
cp -p libgnurx.dll.a libregex.a
Running phase: installPhase
@nix { "action": "setPhase", "phase": "installPhase" }
install flags: SHELL=/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash install
mkdir -p /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/bin
cp -p libgnurx-0.dll /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/bin
mkdir -p /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/include /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/lib
cp -p ./regex.h /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/include
cp -p libgnurx.dll.a libregex.a /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/lib
for s in 3 7; do \
mkdir -p /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/man/man$s; \
gzip -c ./regex.$s > /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/man/man$s/regex.$s.gz; \
done
Running phase: fixupPhase
@nix { "action": "setPhase", "phase": "fixupPhase" }
moving /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/man to /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/share/man
DLLPATH='/nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/bin:/nix/store/f46sb9xfa39dn9hvi7arwpzsgzbcsnvj-x86_64-w64-mingw32-gcc-13.3.0-lib/x86_64-w64-mingw32/lib:/nix/store/f46sb9xfa39dn9hvi7arwpzsgzbcsnvj-x86_64-w64-mingw32-gcc-13.3.0-lib/x86_64-w64-mingw32/lib64:/nix/store/xagf58ckdki9rwlxwpssgnqkpwskzk9x-mcfgthread-x86_64-w64-mingw32-1.6.1/lib:/nix/store/xagf58ckdki9rwlxwpssgnqkpwskzk9x-mcfgthread-x86_64-w64-mingw32-1.6.1/bin'
Created 0 DLL link(s) in /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/bin
shrinking RPATHs of ELF executables and libraries in /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1
checking for references to /build/ in /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1...
gzipping man pages under /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/share/man/
patching script interpreter paths in /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1
stripping (with command x86_64-w64-mingw32-strip and flags -S -p) in /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/lib /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/bin
| 21:34:05 |
Artturin | * It's build log
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/wbiaws7m5skamns5n5kc1xx3c83lkzap-mingw-libgnurx-2.5.1-src.tar.gz
source root is mingw-libgnurx-2.5.1
setting SOURCE_DATE_EPOCH to timestamp 1178567546 of file mingw-libgnurx-2.5.1/configure
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
patching script interpreter paths in ./configure
./configure: interpreter directive changed from "#! /bin/sh" to "/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/sh"
configure flags: --prefix=/nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1 --build=x86_64-unknown-linux-gnu --host=x86_64-w64-mingw32
checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-w64-mingw32-gcc accepts -g... yes
checking for x86_64-w64-mingw32-gcc option to accept ANSI C... none needed
checking whether x86_64-w64-mingw32-gcc accepts the -mthreads option... yes
checking whether x86_64-w64-mingw32-gcc accepts the -mtune=pentium3 option... no
checking for x86_64-w64-mingw32-lib... no
checking for lib... no
configure: creating ./config.status
config.status: creating Makefile
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: SHELL=/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
x86_64-w64-mingw32-gcc -mthreads -g -O2 -I . -c -o regex.o regex.c
In file included from [01m[Kregex.c:61[m[K:
[01m[Kregex_internal.h:424:[m[K [01;35m[Kwarning: [m[K"alloca" redefined
424 | # define alloca(size) __builtin_alloca (size)
|
In file included from [01m[K/nix/store/vchms9s5n98gp5fglxpvm5r3p9if4zf1-x86_64-w64-mingw32-gcc-13.3.0/x86_64-w64-mingw32/sys-include/stdlib.h:770[m[K,
from [01m[Kregex_internal.h:27[m[K:
[01m[K/nix/store/vchms9s5n98gp5fglxpvm5r3p9if4zf1-x86_64-w64-mingw32-gcc-13.3.0/x86_64-w64-mingw32/sys-include/malloc.h:164:[m[K [01;36m[Knote: [m[Kthis is the location of the previous definition
164 | #define alloca(x) __builtin_alloca((x))
|
In file included from [01m[Kregex.c:64[m[K:
[01m[Kregcomp.c:[m[K In function '[01m[Kparse_dup_op[m[K':
[01m[Kregcomp.c:2513:39:[m[K [01;35m[Kwarning: [m[Kcast to pointer from integer of different size [[01;35m[K]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-to-pointer-cast-Wint-to-pointer-cast]8;;[m[K]
2513 | postorder (elem, mark_opt_subexp, [01;35m[K([m[Kvoid *) (long) elem->token.opr.idx);
| [01;35m[K^[m[K
[01m[Kregcomp.c:[m[K In function '[01m[Kmark_opt_subexp[m[K':
[01m[Kregcomp.c:3725:19:[m[K [01;35m[Kwarning: [m[Kcast from pointer to integer of different size [[01;35m[K]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wpointer-to-int-cast-Wpointer-to-int-cast]8;;[m[K]
3725 | int idx = (int) [01;35m[K([m[Klong) extra;
| [01;35m[K^[m[K
x86_64-w64-mingw32-gcc -mthreads -g -O2 -I . -shared -o libgnurx-0.dll -Wl,--enable-auto-image-base -Wl,--out-implib,libgnurx.dll.a regex.o
cp -p libgnurx.dll.a libregex.a
Running phase: installPhase
@nix { "action": "setPhase", "phase": "installPhase" }
install flags: SHELL=/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash install
mkdir -p /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/bin
cp -p libgnurx-0.dll /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/bin
mkdir -p /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/include /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/lib
cp -p ./regex.h /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/include
cp -p libgnurx.dll.a libregex.a /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/lib
for s in 3 7; do \
mkdir -p /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/man/man$s; \
gzip -c ./regex.$s > /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/man/man$s/regex.$s.gz; \
done
Running phase: fixupPhase
@nix { "action": "setPhase", "phase": "fixupPhase" }
moving /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/man to /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/share/man
DLLPATH='/nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/bin:/nix/store/f46sb9xfa39dn9hvi7arwpzsgzbcsnvj-x86_64-w64-mingw32-gcc-13.3.0-lib/x86_64-w64-mingw32/lib:/nix/store/f46sb9xfa39dn9hvi7arwpzsgzbcsnvj-x86_64-w64-mingw32-gcc-13.3.0-lib/x86_64-w64-mingw32/lib64:/nix/store/xagf58ckdki9rwlxwpssgnqkpwskzk9x-mcfgthread-x86_64-w64-mingw32-1.6.1/lib:/nix/store/xagf58ckdki9rwlxwpssgnqkpwskzk9x-mcfgthread-x86_64-w64-mingw32-1.6.1/bin'
Created 0 DLL link(s) in /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/bin
shrinking RPATHs of ELF executables and libraries in /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1
checking for references to /build/ in /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1...
gzipping man pages under /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/share/man/
patching script interpreter paths in /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1
stripping (with command x86_64-w64-mingw32-strip and flags -S -p) in /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/lib /nix/store/84cpsbw62bddnjb9f9jd6zpp0r1qyh5h-libgnurx-x86_64-w64-mingw32-2.5.1/bin
| 21:34:11 |
7 Oct 2024 |
| @memegames99:matrix.org removed their profile picture. | 00:05:43 |