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

can not cross-compile #58

Closed
leleliu008 opened this issue Dec 13, 2021 · 15 comments
Closed

can not cross-compile #58

leleliu008 opened this issue Dec 13, 2021 · 15 comments

Comments

@leleliu008
Copy link

I wanna cross-compile for Android. I find that strfile is ruuning when compiling, actually it can not run when compiling.

@shlomif
Copy link
Owner

shlomif commented Dec 13, 2021 via email

shlomif added a commit that referenced this issue Dec 13, 2021
@shlomif
Copy link
Owner

shlomif commented Dec 13, 2021

hi @leleliu008 . Please try latest git master HEAD. e.g: ee15735 . Thanks!

@leleliu008
Copy link
Author

hi @shlomif Thank you for your quick response.

I tried the git master HEAD, reportted following error messages:

[21/221] cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles && strfile /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/debian debian.dat
FAILED: datfiles/debian.dat /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles/debian.dat
cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles && strfile /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/debian debian.dat
/bin/sh: 1: strfile: not found
[22/221] cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles && strfile /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/art art.dat
FAILED: datfiles/art.dat /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles/art.dat
cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles && strfile /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/art art.dat
/bin/sh: 1: strfile: not found
[23/221] cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles && strfile /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/cookie cookie.dat
FAILED: datfiles/cookie.dat /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles/cookie.dat
cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles && strfile /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/cookie cookie.dat
/bin/sh: 1: strfile: not found
[24/221] cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles && strfile /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/ascii-art ascii-art.dat
FAILED: datfiles/ascii-art.dat /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles/ascii-art.dat
cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles && strfile /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/ascii-art ascii-art.dat
/bin/sh: 1: strfile: not found
[25/221] cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles && /home/linuxbrew/.linuxbrew/bin/perl -e "my (\$src, \$dest) = @ARGV; use File::Copy; copy(\$src, \$dest);" /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/cookie cookie
[26/221] cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles && strfile /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/computers computers.dat
FAILED: datfiles/computers.dat /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles/computers.dat
cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles && strfile /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/computers computers.dat
/bin/sh: 1: strfile: not found
[27/221] cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles && /home/linuxbrew/.linuxbrew/bin/perl -e "my (\$src, \$dest) = @ARGV; use File::Copy; copy(\$src, \$dest);" /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/computers computers
[28/221] cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles && strfile /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/definitions definitions.dat
FAILED: datfiles/definitions.dat /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles/definitions.dat
cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles && strfile /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/definitions definitions.dat
/bin/sh: 1: strfile: not found
[29/221] cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles/off && rot < /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/off/unrotated/zippy > /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles/off/rotated/zippy
FAILED: datfiles/off/rotated/zippy /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles/off/rotated/zippy
cd /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles/off && rot < /tmp/tmp.lEP44Fzldl/fortune-mod/datfiles/off/unrotated/zippy > /tmp/tmp.lEP44Fzldl/1639434589/armeabi-v7a/datfiles/off/rotated/zippy
/bin/sh: 1: rot: not found

@shlomif
Copy link
Owner

shlomif commented Dec 14, 2021

@leleliu008 : hi! "strfile" and "rot" should be in the executables' path. You can get them from a native install of fortune-mod: https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them . I'll add sanity checks for them.

@leleliu008
Copy link
Author

@shlomif thank you! it works now.

shlomif added a commit that referenced this issue Dec 14, 2021
@shlomif
Copy link
Owner

shlomif commented Dec 14, 2021

@leleliu008 : you're welcome.

@leleliu008
Copy link
Author

leleliu008 commented Dec 14, 2021

tree /home/fpliu/.ndk-pkg/install.d/fortune/arm64-v8a -L 4

捕获

shlomif added a commit that referenced this issue Dec 14, 2021
@shlomif
Copy link
Owner

shlomif commented Dec 14, 2021

Fix released in v3.8.0. RESOLVED.

@shlomif shlomif closed this as completed Dec 14, 2021
@leleliu008
Copy link
Author

your new release version v3.8.0 don't work for cross-compile due to commit bf93bf2 has error.

if (NOT "${_found}")

this should change to following:

if (NOT _found)

Reference: https://cmake.org/cmake/help/latest/command/if.html

if(<string>)
A quoted string always evaluates to false unless:

The string's value is one of the true constants, or

Policy CMP0054 is not set to NEW and the string's value happens to be a variable name that is affected by CMP0054's behavior.

@shlomif
Copy link
Owner

shlomif commented Dec 14, 2021

@leleliu008 : thanks! please try again with the git master.

@shlomif shlomif reopened this Dec 14, 2021
@leleliu008
Copy link
Author

ok, it works again.

@shlomif
Copy link
Owner

shlomif commented Dec 14, 2021 via email

@shlomif
Copy link
Owner

shlomif commented Dec 15, 2021

@leleliu008
Copy link
Author

@shlomif I have confirmed that v3.10.0 works well on both native-compile and cross-compile for Android. Many thanks for your help and efforts.

@shlomif
Copy link
Owner

shlomif commented Dec 16, 2021 via email

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