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

fix(main/nasm): fix building with ./build-all.sh #22009

Closed
wants to merge 1 commit into from

Conversation

twaik
Copy link
Member

@twaik twaik commented Oct 28, 2024

Related to #21130

I will merge this in 36 hours if nobody minds or after it gets 2+ approves.

# 46 | ctx->buf[0] = 0x67452301;
# | ~~~ ^

# We should move `-I$TERMUX_PREFIX/include` argument to the end of argument list to make sure it will not take precedense
Copy link
Contributor

@robertkirkman robertkirkman Oct 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is your opinion of my alternative implementation of this workaround in 2 lines instead of 10 lines and globally applying to all packages instead of having to be inserted into every package individually?

Visible here https://github.com/termux/termux-packages/pull/21835/files#diff-1654a7508beaa6c5568cce6c8856a2ba7eafc7879acc96e37496489e31db2815

Long, in-depth explanation and non-exhaustive list of other packages also simultaneously fixed by my implementation are in the PR discussion tab.

Copy link
Member Author

@twaik twaik Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK in this case the -I line is generated by autotools, it is not a part of CFLAGS or something. So it will not work here.

Copy link
Contributor

@robertkirkman robertkirkman Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I test my code it works for me to solve the same error you name here.

Could you test the change I linked to termux_setup_toolchain_27b.sh in your environment to confirm for yourself that it will not work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprising but it worked. I payed attention only now, but you modified CPPFLAGS, not CXXFLAGS as I thought before. @sylirre can you take a look at the referenced PR please?

Copy link
Contributor

@robertkirkman robertkirkman Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you and I am not trying to discredit or negatively attack your PR in any way so I hope it is not interpreted that way, your version is also a valid potential solution, just different, so it is possible there might be reasons yours is better. I just wanted to make sure that you know that my method of solving that error does also work, in case it is worth it to compare them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't -isysroot broke compilation unless ndk-sysroot package content extracted to TERMUX_PREFIX?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK -isysroot adds header search path with low priority, it does not overwrite paths.
And I tried to replace CXXFLAGS's -I$TERMUX_PREFIX/include with -isystem $TERMUX_PREFIX/include and it worked. I can try to invoke ./build-all.sh with this to make sure it won't brake build.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok if it doesn't replace original compiler paths.

Copy link
Member Author

@twaik twaik Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I cloned current master, applied diff of #20513, changed CPPFLAGS in termux_setup_toolchain_27b.sh to have isystem instead of I and invoked ./build-all.sh, skipped hilbish because of task bug and libmaa where I got HTTP error 503. I've got this

Building 0verkill... done in 12 sec
Building 2048-c... done in 4 sec
Building 6tunnel... done in 5 sec
Building 7zip... done in 11 sec
Building adms... done in 12 sec
Building aerc... done in 31 sec
Building agate... done in 41 sec
Building age... done in 7 sec
Building agg... done in 37 sec
Building aha... done in 3 sec
Building aichat... done in 88 sec
Building algernon... done in 26 sec
Building alist... done in 72 sec
Building amber... done in 35 sec
Building amfora... done in 14 sec
Building anewer... done in 11 sec
Building angle-android... done in 2462 sec
Building angle-grinder... done in 42 sec
Building antibody... done in 8 sec
Building antiword... done in 4 sec
Building aptly... done in 24 sec
Building argon2... done in 4 sec
Building argp... done in 10 sec
Building arj... done in 11 sec
Building artalk... done in 31 sec
Building at... done in 7 sec
Building attr... done in 9 sec
Building atuin... done in 159 sec
Building autoconf-archive... done in 8 sec
Building avra... done in 4 sec
Building await... done in 4 sec
Building b3sum... done in 13 sec
Building badvpn-udpgw... done in 4 sec
Building base16384... done in 14 sec
Building bed... done in 7 sec
Building bgrep... done in 100 sec
Building bionic-host... done in 1935 sec
Building bk... done in 17 sec
Building blink... done in 6 sec
Building blogc... done in 6 sec
Building bombadillo... done in 5 sec
Building bore... done in 15 sec
Building brook... done in 26 sec
Building brotli... done in 7 sec
Building bsd-finger... done in 4 sec
Building buf... done in 43 sec
Building busybox... done in 17 sec
Building ca-certificates... done in 5 sec
Building cabextract... done in 5 sec
Building caddy... done in 38 sec
Building capstone... done in 14 sec
Building catimg... done in 4 sec
Building cavif-rs... done in 36 sec
Building cc65... done in 60 sec
Building cfm... done in 14 sec
Building cgal... done in 26 sec
Building cgif... done in 5 sec
Building chezmoi... done in 40 sec
Building chicken... done in 32 sec
Building choose... done in 15 sec
Building cicada... done in 54 sec
Building cliaoke... done in 9 sec
Building clidle... done in 9 sec
Building clipp... done in 3 sec
Building cloudflared... done in 18 sec
Building cmark... done in 4 sec
Building cmocka... done in 6 sec
Building cointop... done in 12 sec
Building cookcli... done in 75 sec
Building corgi... done in 16 sec
Building cppi... done in 12 sec
Building cpufetch... done in 3 sec
Building cpulimit... done in 2 sec
Building croc... done in 9 sec
Building crunch... done in 7 sec
Building csview... done in 53 sec
Building cuetools... done in 7 sec
Building curlie... done in 5 sec
Building daemonize... done in 6 sec
Building darkhttpd... done in 3 sec
Building dasel... done in 10 sec
Building dash... done in 8 sec
Building dasm... done in 3 sec
Building datamash... done in 19 sec
Building dateutils... done in 19 sec
Building debianutils... done in 7 sec
Building desed... done in 20 sec
Building diffstat... done in 4 sec
Building direnv... done in 7 sec
Building diskus... done in 17 sec
Building dmagnetic... done in 4 sec
Building dnote... done in 13 sec
Building dnote-server... done in 14 sec
Building dns2tcp... done in 5 sec
Building dnslookup... done in 10 sec
Building dnsmap... done in 6 sec
Building dotconf... done in 9 sec
Building dtach... done in 9 sec
Building dtc... done in 6 sec
Building dua... done in 34 sec
Building duf... done in 7 sec
Building dufs... done in 52 sec
Building dust... done in 30 sec
Building dx... done in 4 sec
Building ecj... done in 19 sec
Building ed... done in 5 sec
Building eigen... done in 7 sec
Building eja... done in 5 sec
Building electric-fence... done in 3 sec
Building elvish... done in 8 sec
Building entr... done in 5 sec
Building esbuild... done in 9 sec
Building etsh... done in 6 sec
Building exercism... done in 10 sec
Building fasd... done in 2 sec
Building fastmod... done in 20 sec
Building fclones... done in 45 sec
Building fcp... done in 12 sec
Building fd... done in 32 sec
Building fftw... done in 48 sec
Building figlet... done in 6 sec
Building flyctl... done in 72 sec
Building fm... done in 17 sec
Building fmt... done in 5 sec
Building fortune... done in 6 sec
Building frp... done in 21 sec
Building fselect... done in 57 sec
Building fsmon... done in 3 sec
Building fx... done in 12 sec
Building fzy... done in 3 sec
Building gbt... done in 7 sec
Building gdu... done in 19 sec
Building geckodriver... done in 32 sec
Building geoip2-database... done in 30 sec
Building germanium... done in 11 sec
Building getconf... done in 3 sec
Building geth... done in 143 sec
Building gforth... done in 430 sec
Building gh... done in 68 sec
Building giflib... done in 7 sec
Building gifski... done in 28 sec
Building git-lfs... done in 10 sec
Building glab-cli... done in 23 sec
Building glibc-repo... done in 1 sec
Building glm... done in 5 sec
Building glow... done in 18 sec
Building gobang... done in 55 sec
Building gojq... done in 6 sec
Building goose... done in 35 sec
Building gopls... done in 17 sec
Building gotop... done in 10 sec
Building gotty... done in 11 sec
Building grex... done in 18 sec
Building gron... done in 7 sec
Building gsl... done in 43 sec
Building gum... done in 15 sec
Building gumbo-parser... done in 10 sec
Building gzip... done in 15 sec
Building hcl... done in 12 sec
Building helm... done in 44 sec
Building helm-ls... done in 45 sec
Building hexyl... done in 18 sec
Building heyu... done in 5 sec
Skipping hilbish
Building hoedown... done in 4 sec
Building hors... done in 29 sec
Building hummin... done in 10 sec
Building hunspell-en-us... done in 6 sec
Building hunspell-fr... done in 8 sec
Building hunspell-hu... done in 11 sec
Building hunspell-nl... done in 10 sec
Building hunspell-ru... done in 8 sec
Building hut... done in 11 sec
Building hydroxide... done in 10 sec
Building hyperfine... done in 23 sec
Building hz... done in 19 sec
Building influxdb... done So I invoked in 65 sec
Building inotify-tools... done in 12 sec
Building ipfs... done in 45 sec
Building ired... done in 3 sec
Building jcal... done in 12 sec
Building jfrog-cli... done in 92 sec
Building jhead... done in 4 sec
Building jira-go... done in 14 sec
Building jo... done in 6 sec
Building jq-lsp... done in 5 sec
Building jql... done in 18 sec
Building json-c... done in 10 sec
Building jump... done in 4 sec
Building just... done in 50 sec
Building k9s... done in 113 sec
Building kainjow-mustache... done in 3 sec
Building kakoune-lsp... done in 75 sec
Building kbd... done in 11 sec
Building kcptun... done in 11 sec
Building keybase... done in 99 sec
Building kibi... done in 14 sec
Building kona... done in 4 sec
Building kubectl... done in 50 sec
Building kubelogin... done in 11 sec
Building lazygit... done in 22 sec
Building lcal... done in 7 sec
Building lexbor... done in 10 sec
Building lf... done in 9 sec
Building lhasa... done in 8 sec
Building liba52... done in 11 sec
Building libacl... done in 12 sec
Building libaml... done in 3 sec
Building libandroid-complex-math... done in 3 sec
Building libandroid-execinfo... done in 3 sec
Building libandroid-glob... done in 2 sec
Building libandroid-posix-semaphore... done in 2 sec
Building libandroid-shmem... done in 3 sec
Building libandroid-stub... done in 3 sec
Building libandroid-support... done in 4 sec
Building libandroid-sysv-semaphore... done in 2 sec
Building libandroid-utimes... done in 4 sec
Building libandroid-wordexp... done in 3 sec
Building libatomic-ops... done in 7 sec
Building libburn... done in 8 sec
Building libbz2... done in 4 sec
Building libc++... done in 2 sec
Building libcap... done in 6 sec
Building libcap-ng... done in 11 sec
Building libccd... done in 4 sec
Building libchipmunk... done in 4 sec
Building libcoinor-utils... done in 21 sec
Building libconfig... done in 17 sec
Building libconfuse... done in 8 sec
Building libcpufeatures... done in 4 sec
Building libcue... done in 4 sec
Building libcunit... done in 9 sec
Building libdaemon... done in 12 sec
Building libdav1d... done in 8 sec
Building libdb... done in 30 sec
Building libde265... done in 18 sec
Building libdeflate... done in 4 sec
Building libdispatch... done in 6 sec
Building libdmtx... done in 10 sec
Building libdrm... done in 8 sec
Building libduktape... done in 13 sec
Building libdvbcsa... done in 9 sec
Building libdvbpsi... done in 7 sec
Building libdvdread... done in 6 sec
Building libebml... done in 5 sec
Building libebur128... done in 3 sec
Building libenet... done in 16 sec
Building libev... done in 6 sec
Building libevent... done in 11 sec
Building libexif... done in 12 sec
Building libexpat... done in 8 sec
Building libfann... done in 5 sec
Building libfdk-aac... done in 17 sec
Building libffi... done in 7 sec
Building libfixposix... done in 11 sec
Building libftxui... done in 9 sec
Building libgc... done in 13 sec
Building libgeos... done in 43 sec
Building libgf2x... done in 14 sec
Building libgfshare... done in 7 sec
Building libgmp... done in 25 sec
Building libgpg-error... done in 21 sec
Building libgraphite... done in 6 sec
Building libhyphen... done in 15 sec
Building libiconv... done in 17 sec
Building libicu... done in 129 sec
Building libidn... done in 16 sec
Building libimagequant... done in 23 sec
Building libinih... done in 5 sec
Building libiniparser... done in 4 sec
Building libiodbc... done in 11 sec
Building libisl... done in 18 sec
Building libjansi... done in 4 sec
Building libjansson... done in 11 sec
Building libjpeg-turbo... done in 11 sec
Building libkokkos... done in 9 sec
Building libksba... done in 9 sec
Building libliquid-dsp... done in 10 sec
Building liblmdb... done in 8 sec
Building liblo... done in 16 sec
Building liblog4c... done in 17 sec
Building libluajit... done in 14 sec
Building liblz4... done in 5 sec
Building liblzma... done in 12 sec
Building liblzo... done in 11 sec
Building libmatroska... done in 6 sec
Building libmaxminddb... done in 11 sec
Building libmcrypt... ERROR: See /home/builder/.termux-build/_buildall-aarch64/libmcrypt.out

I stucked on libmcrypt because I did not apply the fix from my PR but I assume nothing was broken.

Copy link
Contributor

@robertkirkman robertkirkman Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@twaik twaik marked this pull request as draft October 29, 2024 05:26
@twaik
Copy link
Member Author

twaik commented Oct 30, 2024

Superseded by #21835.

@twaik twaik closed this Oct 30, 2024
@twaik twaik deleted the nasm-fix-build-all-sh branch October 30, 2024 15:51
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

Successfully merging this pull request may close these issues.

3 participants