[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kerberos
Subject:    Cross compilation problems targeting mac and windows
From:       Thomas Poulsen <ta.poulsen () gmail ! com>
Date:       2022-04-12 13:10:44
Message-ID: CAExYbVM4GfHpUYUUr5rbpxEPAkeOd_BMQ9M7aosueLL+E+5Tqw () mail ! gmail ! com
[Download RAW message or body]

Dear list,

I'm trying to compile krb5 for the Julia [BinaryBuilder](
https://github.com/JuliaPackaging/BinaryBuilder.jl), which depends on cross
compilation.
The tests are done with version Kerberos 1.19.3, which is latest release.

When running configure for cross compilation I get an error. Eg:

```
krb5-1.19.3/src$ ./configure --build=x86_64-linux-gnu
--host=aarch64-linux-musl
  checking for constructor/destructor attribute support... configure:
error: Cannot test for constructor/destructor support when cross compiling
```

Searching the internet found some variables to set to make the configure
run through:

``'
krb5-1.19.3/src$ ac_cv_func_regcomp=yes ac_cv_printf_positional=yes
krb5_cv_attr_constructor_destructor=yes,yes  ./configure
--build=x86_64-linux-gnu --host=aarch64-linux-musl
```

With this I can build for linux and bsd, but it fails to build for mac and
windows.

I have 2 questions:

1. Can I trust the builds coming out of the above configuration?
2. What is needed to make cross compilation to mac and windows work?

Hope you can help me.

Below is the last output when the mac build fails:

[14:57:20] cc  -DSHARED -DHAVE_CONFIG_H  -I../../../include
-I../../../include -I./ccapi -I. -I.  -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE
 -g -O2 -fno-common -Werror=unknown-warning-option -Wall -Wcast-align
-Wshadow -Wmissing-prototypes -Wno-format-zero-length -Woverflow
-Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes
-Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function
-Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas
-Wsign-compare -Wnewline-eof -Werror=uninitialized -Werror=pointer-arith
-Werror=int-conversion -Werror=incompatible-pointer-types
-Werror=implicit-int -Werror=declaration-after-statement
-Werror-implicit-function-declaration -pthread  -c cc_file.c -o
cc_file.so.o && mv -f cc_file.so.o cc_file.so
[14:57:21] mig -header kcmrpc.h -user kcmrpc.c -sheader /dev/null \
[14:57:21] -server /dev/null -I. ./kcmrpc.defs
[14:57:21] make[3]: mig: No such file or directory
[14:57:21] make[3]: *** [Makefile:755: kcmrpc.h] Error 127
[14:57:21] make[3]: Leaving directory
'/workspace/srcdir/krb5-1.19.3/src/lib/krb5/ccache'
[14:57:21] make[2]: *** [Makefile:1155: all-recurse] Error 1
[14:57:21] make[2]: Leaving directory
'/workspace/srcdir/krb5-1.19.3/src/lib/krb5'
[14:57:21] make[1]: *** [Makefile:1005: all-recurse] Error 1
[14:57:21] make[1]: Leaving directory
'/workspace/srcdir/krb5-1.19.3/src/lib'
[14:57:21] make: *** [Makefile:1554: all-recurse] Error 1
[14:57:21]  ---> make
[14:57:21]  ---> make
[14:57:21] Previous command exited with 2
[14:57:21] Child Process exited, exit code 2
________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic