Skip to content

Conversation

@be2020
Copy link

@be2020 be2020 commented Feb 6, 2024

Also fixes #19055

@MyNameIsTrez
Copy link

I downloaded termux an hour ago and immediately ran into this issue with tcc. Thanks for fixing it!

Copy link
Member

@TomJo2000 TomJo2000 left a comment

Choose a reason for hiding this comment

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

Great work, I don't see any functional issues,
I have a couple minor style suggestions though to put the build.sh more in line with common conventions.

TERMUX_PKG_VERSION=1:0.9.28-p${_COMMIT_DATE}
TERMUX_PKG_SRCURL=git+https://repo.or.cz/tinycc.git
TERMUX_PKG_SHA256=467792219d0172f594ec71bcd6bac9dbb25308cbe9f708bab455b717148b491b
TERMUX_PKG_SHA256=$_COMMIT_SHA256
Copy link
Member

@TomJo2000 TomJo2000 Feb 26, 2024

Choose a reason for hiding this comment

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

Suggested change
TERMUX_PKG_SHA256=$_COMMIT_SHA256
TERMUX_PKG_SHA256=26974776737d9da876395cc72a005a63526e305aeaa28ebf84c56778a8d9fdac

Since $_COMMIT_SHA256 is only ever used as the value of $TERMUX_PKG_SHA256,
why have it as a separate variable in the first place?

Comment on lines 1 to 4
_COMMIT=4e91d38ddcdb659a4b2c298850c6ccf115073748
_COMMIT_DATE=20240225
_COMMIT_SHA256=26974776737d9da876395cc72a005a63526e305aeaa28ebf84c56778a8d9fdac

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
_COMMIT=4e91d38ddcdb659a4b2c298850c6ccf115073748
_COMMIT_DATE=20240225
_COMMIT_SHA256=26974776737d9da876395cc72a005a63526e305aeaa28ebf84c56778a8d9fdac

_COMMIT_DATE=20230415
TERMUX_PKG_VERSION=1:0.9.27-p${_COMMIT_DATE}
TERMUX_PKG_REVISION=1
TERMUX_PKG_VERSION=1:0.9.28-p${_COMMIT_DATE}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
TERMUX_PKG_VERSION=1:0.9.28-p${_COMMIT_DATE}
_COMMIT=4e91d38ddcdb659a4b2c298850c6ccf115073748
_COMMIT_DATE=20240225
TERMUX_PKG_VERSION=1:0.9.28-p${_COMMIT_DATE}

_COMMIT and _COMMIT_DATE are usually inlined with the TERMUX_PKG_* variables.
For an example see:

_COMMIT=fbe6fe7f55cfc2a32f9cee4cb50502a53d3ce8bb
_COMMIT_DATE=20230428
TERMUX_PKG_VERSION=3.3a-p${_COMMIT_DATE}
TERMUX_PKG_SRCURL=git+https://github.com/tmux/tmux
TERMUX_PKG_SHA256=b61189533139bb84bdc0e96546a5420c183d7ba946a559e891d313c1c32d953d

Although I don't believe this is a "rule" in the guidelines.
It's just a convention most other occurences of these variables in build scripts seem to follow.

Copy link
Member

Choose a reason for hiding this comment

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

0.9.28 is also a release candidate version not stable version for now. So I suggest you use TERMUX_PKG_VERSION=1:0.9.28~p${_COMMIT_DATE} instead.

Copy link
Member

Choose a reason for hiding this comment

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

I really think we should move back to archive tarball once 0.9.28 is declared stable. https://download.savannah.nongnu.org/releases/tinycc/

There's no real advantage of using git clone unless need to pull some submodules dependencies.

ANDROID_LIB_PATH="/system/lib64:/system/vendor/lib64"
fi
# override default step
echo "running on : $(uname -a)"
Copy link
Member

Choose a reason for hiding this comment

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

Was this meant to be left in here?
Or is this just a leftover debugging aid.

Copy link
Author

Choose a reason for hiding this comment

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

Both (if you want to).

Copy link
Member

Choose a reason for hiding this comment

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

Well in the CI the runs get separated by architecture anyway, so this really is only somewhat useful for local test builds.

Copy link
Author

Choose a reason for hiding this comment

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

Well, long story: Because of package.yml: "Setup arm and aarch64 CPU emulators" I got curious whether the "stage 1" tcc would maybe run in qemu. As it turns out it doesn't, it's always a x86_64 executable, regardless of the final package architecture. Indeed we don't really have to know that, as long as there aren't any problems ...

Copy link
Member

Choose a reason for hiding this comment

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

The qemu was never used anywhere. It also need a Android linker to work. So you can remove it.

Copy link
Member

@TomJo2000 TomJo2000 Apr 2, 2024

Choose a reason for hiding this comment

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

Unresolving, since its still there.

@twaik
Copy link
Member

twaik commented Oct 18, 2024

@be2020 can you please rebase this PR to current master and change files as suggested?

@be2020
Copy link
Author

be2020 commented Oct 22, 2024

rebased & changes applied ...

ANDROID_LIB_PATH="/system/lib64:/system/vendor/lib64"
fi
# override default step
true
Copy link
Member

Choose a reason for hiding this comment

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

Usually we put : for empty build steps, with no comments.

@twaik
Copy link
Member

twaik commented Oct 23, 2024

So there are two pending problems (build script related) to be resolved.

be2020 added 3 commits October 23, 2024 03:09
Let termux do the "make install" (as suggested).
Also. use most recent upstream commit.
- remove merely informative line from termux_step_configure()
- use '~' in TERMUX_PKG_VERSION to indicate release candidate
- fetch the latest tinycc commit & remove redundant patch
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.

[Bug]: tcc unhappy about system headers

6 participants