Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#61834 - [luasocket] ignores CFLAGS

Attached to Project: Community Packages
Opened by Maxime Buquet (ppjet6) - Saturday, 23 February 2019, 01:16 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 28 April 2019, 10:43 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version 5.1.2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:

When building `luasocket` (lua{5{1,2},}-socket) with debug symbols, some files are being installed in my home directory.
I am not sure if it's a bug in the PKGBUILD, but after asking on #archlinux there is nothing obvious in it and I was asked to report.

Steps to Reproduce:

- default OPTIONS in makepkg.conf
- asp update && asp checkout luasocket && cd luasocket/trunk
- add `options=('debug')`
- makepkg -s

What happens:

A listing of luasocket-debug-20190219-1-x86_64.pkg.tar.xz shows the following:

.PKGINFO
.MTREE
.BUILDINFO
home/
home/ppjet/
home/ppjet/abs/
home/ppjet/abs/luasocket/
home/ppjet/abs/luasocket/trunk/
home/ppjet/abs/luasocket/trunk/src/
home/ppjet/abs/luasocket/trunk/src/luasocket/
home/ppjet/abs/luasocket/trunk/src/luasocket-51/
home/ppjet/abs/luasocket/trunk/src/luasocket-51/src/
home/ppjet/abs/luasocket/trunk/src/luasocket-51/src/auxiliar.c
home/ppjet/abs/luasocket/trunk/src/luasocket-51/src/buffer.c
home/ppjet/abs/luasocket/trunk/src/luasocket-51/src/compat.c
home/ppjet/abs/luasocket/trunk/src/luasocket-51/src/except.c
[..]

A bunch of files that should go in /usr/src/debug (?) are being placed in my home directory.
This task depends upon

Closed by  Jelle van der Waa (jelly)
Sunday, 28 April 2019, 10:43 GMT
Reason for closing:  Deferred
Additional comments about closing:  Removed from repos
Comment by Allan McRae (Allan) - Saturday, 23 February 2019, 01:34 GMT
I can replicate... weird!
Comment by Ryan Farley (rcf) - Saturday, 23 February 2019, 01:55 GMT
The root cause of this seems to be a build system which does not respect environment-specified CFLAGS, specifically -fdebug-prefix-map (which is set in prepare_buildenv() in makepkg). As one can see by examining unstripped binaries with readelf (as source_files() in tidy/strip.sh does, to determine what to package when strip and debug are both set in options) this leads to DW_AT_comp_dir symbols referencing the actual $srcdir, rather than /usr/src/debug, and that's the path that ends up in the package as well.

As for how to fix it, one might pester the upstreams to obey the environment, or possibly check for $srcdir contamination in source_files(), which I'll try out at some point in the near future.
Comment by Allan McRae (Allan) - Saturday, 23 February 2019, 02:10 GMT
MYCFLAGS=$CFLAGS make LUAV=5.3 linux
Comment by Allan McRae (Allan) - Saturday, 23 February 2019, 02:12 GMT
  • Field changed: Category (makepkg → Packages)
  • Field changed: Architecture (All → All)
  • Task reassigned to Sergej Pupykin (sergej)
Needs done for LDFLAGS too.
Comment by Eli Schwartz (eschwartz) - Sunday, 24 February 2019, 02:22 GMT
Yay, doing debug packages like this leads to discovering real bugs in upstream CFLAGS. :D
Comment by Sergej Pupykin (sergej) - Monday, 25 February 2019, 08:34 GMT
fixed in svn/trunk

Loading...