-
Notifications
You must be signed in to change notification settings - Fork 145
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
Using crossbuild to build static external libraries #22
Comments
Hi @cleung2010
yes it is possible, however in some cases, it may be harder than just running the image with the correct env, can you give me some more detail about your issues ?
Probably related with #21 |
An example would be to build libgit2, openssl, and libssh2 for different operating systems using I am trying to get it to work in here, and got |
@cleung2010 there is now an |
Has anyone managed to build libgit2 (including libssh2 and openssl) on macos with this docker image? |
I tried the following commands but I get an error on # ./Configure darwin64-x86_64-cc
Configuring OpenSSL version 1.1.1-pre3-dev (0x10101003L) for darwin64-x86_64-cc
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile
**********************************************************************
*** ***
*** If you want to report a building issue, please include the ***
*** output from this command: ***
*** ***
*** perl configdata.pm --dump ***
*** ***
**********************************************************************
# make depend
# make
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" crypto/include/internal/bn_conf.h.in > crypto/include/internal/bn_conf.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" crypto/include/internal/dso_conf.h.in > crypto/include/internal/dso_conf.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
make depend && make _all
make[1]: Entering directory '/go/src/github.com/openssl/openssl'
make[1]: Leaving directory '/go/src/github.com/openssl/openssl'
make[1]: Entering directory '/go/src/github.com/openssl/openssl'
cc -I. -Iinclude -O3 -arch x86_64 -Wall -fPIC -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPADLOCK_ASM -DPOLY1305_ASM -D_REENTRANT -DL_ENDIAN -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -c -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o apps/app_rand.c
cc: error: x86_64: No such file or directory
cc: error: unrecognized command line option '-arch'
Makefile:696: recipe for target 'apps/app_rand.o' failed
make[1]: *** [apps/app_rand.o] Error 1
make[1]: Leaving directory '/go/src/github.com/openssl/openssl'
Makefile:146: recipe for target 'all' failed
make: *** [all] Error 2 |
After setting
I tried setting |
Is it possible to use crossbuild to build external static libraries for different platforms? More specifically, I would like to build libgit2 and its dependencies statically (openssl and libssh2). I have been encountering one error after another, but it is most likely because I am not familiar enough in the subject matter.
Side note: Both libgit2 and libssh2 uses CMake for the build/install, which in turn depends heavily on pkg-config. I realized that when passing in
CROSS_TRIPLE=x86_64-apple-darwin
, pkg-config is installed, but otherwise it is not present on the image.The text was updated successfully, but these errors were encountered: