Closed jirutka closed 2 years ago
I've had a quick go using CC=musl-gcc CXX=musl-gcc CFLAGS="-m32" make
however ran into some issues including /usr/include/wayland*
My cross-compiler-fu is very limited. Perhaps you could point me to, say, a docker image that replicates your setup.
Even better, a PR would be gratefully accepted. I can validate x86_64-pc-linux-gnu
, you can validate your 32 bit case.
Whatever we do, I will change config.mk
to use CC ?= gcc
etc. now that I know people are cross compiling.
CC ?= gcc
is pointless because GNU make always defines CC
e.g.,
$ env -i gmake -p | grep '^CC'
CC = cc
CC ?= gcc is pointless because GNU make always defines CC e.g.,
I see that you have defined CC here: https://github.com/freebsd/freebsd-ports/blob/a7011e478978bdf10607e39066e2f7a6fa444cd4/x11/way-displays/Makefile#L25-L27
Does that work via the -e flag? make -e CC=ABC -p | grep ^CC
/nudge @jirutka
It would be great if we could resolve this using a virtual environment.
Does that work via the -e flag?
make -e CC=ABC -p | grep ^CC
-e
doesn't require extra arguments, so CC=ABC make -e
is similar to make CC=ABC
.
src/log.c:21:59: error: format '%ld' expects argument of type 'long int', but argument 7 has type 'suseconds_t' {aka 'long long int'} [-Werror=format=]
Likely caused by musl@38143339646a. I can't reproduce on FreeBSD i386 where suseconds_t
is still long
on all architectures.
Thanks @jbeich
Something simple like long msec = tv.tv_usec / 1000;
before the printf would be fine as we know that it fits into a long.
Could you please try that out @jirutka ?
1.4.1 should resolve this; all the formatting is delegated to strftime which handles unpacking the struct tm.
Removed the milliseconds, which weren't providing much value.
Flagged for update to 1.5.0.
Please reopen or open a new issue if problems persist.
Thanks for the fix and sorry about the late response. I can confirm that the problem is indeed gone.
Thanks @jirutka
Please keep raising such issues - I cannot build on every possible environment ;)
Please keep raising such issues
I didn’t find any other compatibility issue, way-displays now builds fine on all architectures.
I cannot build on every possible environment ;)
Actually, you can, using CI, e.g. GitHub Actions. You can take some inspiration from https://github.com/jirutka/tty-copy/blob/master/.github/workflows/ci.yml.
That's really useful, many thanks.
runs-on: macos-latest
is incredible!