Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4.0 fails to build on aarch64 #23

Closed
jbeich opened this issue Feb 22, 2022 · 4 comments
Closed

1.4.0 fails to build on aarch64 #23

jbeich opened this issue Feb 22, 2022 · 4 comments

Comments

@jbeich
Copy link
Contributor

jbeich commented Feb 22, 2022

1.3.0 built fine, so probably regressed by 8f06db8.

src/log.c:73:15: error: invalid operands to binary expression ('const char *restrict' and 'va_list' (aka '__builtin_va_list'))
        if (__format && __args) {
            ~~~~~~~~ ^  ~~~~~~
src/log.c:105:48: error: passing 'void *' to parameter of incompatible type 'va_list' (aka '__builtin_va_list')
                print_line(threshold, "", 0, __stream, NULL, NULL);
                                                             ^~~~
/usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL'
#define NULL    ((void *)0)
                ^~~~~~~~~~~
src/log.c:66:143: note: passing argument to parameter '__args' here
void print_line(enum LogThreshold threshold, const char *prefix, int eno, FILE *__restrict __stream, const char *__restrict __format, va_list __args) {
                                                                                                                                              ^
2 errors generated.
$ cc --version
FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)
Target: aarch64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /nxb-bin/usr/bin
@alex-courtis
Copy link
Owner

Thanks for raising.

I've setup a FreeBSD VM and am slowly changing the make to be BSD friendly.

I'll take a look at this one afterwards.

@jbeich
Copy link
Contributor Author

jbeich commented Feb 22, 2022

I've setup a FreeBSD VM

Only aarch64 is affected, 1.4.0 builds fine on amd64 and i386. The issue maybe specific to FreeBSD aarch64 or may affect Linux aarch64 as well.

Cross-compilation on FreeBSD looks like the following:

$ pkg install poudriere
$ poudriere ports -c
$ poudriere jail -cj 130aarch64 -x -a arm64.aarch64 -v 13.0-RELEASE
$ poudriere testport -i -j 130aarch64 x11/way-displays

(Outside of poudriere it's more complicated).

slowly changing the make to be BSD friendly

POSIX make aka subset supported by both GNU make and BSD make is too useless for most projects. GNU make is pkg install gmake away, so if you want to go extra mile rename Makefile to GNUmakefile and document in README that building requres gmake on non-GNU systems (make can be BSD make or similar even on Linux but this is rare).

@alex-courtis
Copy link
Owner

Fixed at tag 1.4.1 I'd be grateful if you could verify.

Worked inside arm64.aarch64. Those poudriere jails are very useful.

Thank you for the GNUmakefile tip. I have made the changes. The arch build is fine, as we assume GNU make ;)

@jbeich
Copy link
Contributor Author

jbeich commented Feb 23, 2022

I confirm, builds fine now.

@jbeich jbeich closed this as completed Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants