Closed zetalog closed 2 years ago
Other than this, it looks ck can perfectly support cross compilation. I confirmed that by forcing a COMPILER name here to bypass the detection code.
So please help to fix the issue in the right way in ck upstream. Thanks in advance.
Related PR: https://github.com/concurrencykit/ck/pull/194
Below is the patch to bypass COMPILER detection:
Index: ck/configure
===================================================================
--- ck.orig/configure
+++ ck/configure
@@ -657,7 +669,8 @@ if test ! -x "${CC}"; then
fi
assert "$CC" "not found"
-cat << EOF > .1.c
+if test "x$COMPILER" = "x"; then
+ cat << EOF > .1.c
#include <stdio.h>
int main(void) {
#if defined(_WIN32)
@@ -685,10 +698,11 @@ int main(void) {
}
EOF
-$CC -o .1 .1.c
-COMPILER=`./.1 2> /dev/null`
-r=$?
-rm -f .1.c .1
+ $CC -o .1 .1.c
+ COMPILER=`./.1 2> /dev/null`
+ r=$?
+ rm -f .1.c .1
+fi
if test "$r" -ne 0; then
assert "" "update compiler"
This may not be required by upstream if the issue can be properly handled. But if you want, I can also push it to the upstream.
Thanks for patch!
@sbahra, I don't see https://github.com/concurrencykit/ck/issues/193#issuecomment-1162564889 making it into the master branch. https://github.com/concurrencykit/ck/pull/194 did not include it.
It looks the "configure" is a hand-writing script not a script generated by autoconf, and contains the following code:
The block is trying to execute a target binary via the following line and definitely will fail:
It thus looks like that the "ck" doesn't support cross compile. Am I right? If not, please help to tell how could we cross compile ck.
Thanks in advance.