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

Add fixes for debug builds #2296

Merged
merged 29 commits into from
Jun 13, 2018
Merged

Add fixes for debug builds #2296

merged 29 commits into from
Jun 13, 2018

Conversation

Grimler91
Copy link
Member

Add possiblity for debug patches (name them *.patch.debug).
Also add option TERMUX_PKG_HAS_DEBUG which defaults to yes. Setting it to no makes build-package.sh skip debug build of package.

All packages except libllvm builds with these fixes. I added TERMUX_PKG_HAS_DEBUG=no to it for now.

There was mostly two types of errors, either that __attribute__((overloadable)) needed to be added to strchr/strcpy/... or that -D_FORTIFY_SOURCE=2 causes various errors (which probably has valid root causes that should be fixed).

Apart from that there were some other different issues with some packages.

Most (but not all) of the debug patches work for normal builds as well but I've added them as debug patches to not break something by mistake.

We should look over the debug build process, and make it more similar to how debian does it (which I still don't quite understand. The current setup with TERMUX_PKG_REPLACES and renaming to -dbg is not really working fully.

Grimler91 and others added 29 commits March 22, 2018 22:00
…S_DEBUG

Setting TERMUX_PKG_HAS_DEBUG=no disables attempt to build debug build of
package.
Useful for example if a debug build doesn't make sense, as for python-packages
and texlive.
Configure script removes it otherwise.
Use strncpy instead of strcpy.
Original error message:
loslib.c:169:3: error: 'strcpy' called with string bigger than buffer
  lua_tmpnam(buff, err);
  ^
loslib.c:122:37: note: expanded from macro 'lua_tmpnam'
       strcpy(b, LUA_TMPNAMTEMPLATE); \
                                   ^
Debug build complained about the previous implicit declaration.
Debug build fails with:
home/builder/.termux-build/libllvm/src/lib/Support/Unix/Path.inc:740:19: error: no matching function for call to 'RetryAfterSignal'                                                                                                      if ((ResultFD = sys::RetryAfterSignal(-1, open, P.begin(), OpenFlags)) < 0)
Hopefully allows us to install debug packages without breaking dependecies.

Should be looked over and be made more similar to how debian does this in any case
@fornwall fornwall merged commit c18051e into termux:master Jun 13, 2018
@fornwall
Copy link
Member

Nice, sorry for the delay!

@Grimler91
Copy link
Member Author

No worries. I should probably test this again, some patches might be redundant after the update to ndk r17.

@stydent21rus
Copy link

Hi!!is it possible to upgrade aapt to version 8.1??

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