[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#824489: RFS: dwarfutils/20160507-1 [ITA] -- utility and library to work with DWARF debug information



Hi Fabian


>dh_auto_install does not do anything useful here: `make install` for

>some reason does not actually install anything but just compiles some
>examples (that won't be part of the Debian package) and then finishes
>with the note
>
>"No install provided, see comments in the README"
>
>The README basically says that the installation should be performed
>manually by copying the desired files to the desired directories,
>which is what dh_install will do in the next step. Therefore, calling
>dh_auto_install probably won't hurt, but it does waste time, which is
>why I have overwritten it with an empty rule.


I don't see why it can't be patched to work like almost every other tool
that uses a build system, but I don't care a lot about upstream.

The (possible) issue I foresee is: somebody updates the upstream build system
to install the files too, you update the packaging without checking
that, the Debian upload is buggy because some files are missing.

in short words, I prefer an useless call, rather than a broken package!

>The hardening rules do export -fPIE, but not -fPIC. Without -fPIC, I
>get the following error when trying to link the static library into
>another shared library:
>
>/usr/bin/ld: /tmp/[...]/usr/lib/libdwarf.a(dwarf_alloc.o): relocation R_X86_64_PC32 against symbol `dwarf_dealloc' can not be used when making a shared object; >recompile with -fPIC
>/usr/bin/ld: final link failed: Bad value
>collect2: error: ld returned 1 exit status


ok

>Your patch doesn't fix that, either (although I might have missed
>something there; I'm not exactly fluent in Autotools), whereas if I'm
>building libdwarf with -fPIC, the shared library builds and links just

>fine.

I'm not fluent too, thanks for checking and replying about that, it was already
fine, but I just wanted to be sure there was a rationale for the change!

let me know your opinion about the install step, and I'll do the final checks + sponsoring


BTW, I like when a patch/fix can be upstream, so I propose another one (feel free to reject of course, you are
the maintainer, not me!)
--- dwarfutils-20160507.orig/libdwarf/configure.in
+++ dwarfutils-20160507/libdwarf/configure.in
@@ -127,11 +127,11 @@ AC_TRY_COMPILE([#include <elf.h>],[  Elf
dnl default-disabled shared
AC_SUBST(build_shared,[none])
AC_SUBST(dwfpic,[])
+AC_SUBST(dwfpic,[-fPIC])
AC_ARG_ENABLE(shared,AC_HELP_STRING([--enable-shared],
[build shared library libdwarf.so]))
AS_IF([ test "x$enable_shared" = "xyes"], [
AC_SUBST(build_shared,[libdwarf.so])
-   AC_SUBST(dwfpic,[-fPIC])
])

dnl default-enabled nonshared


maybe it makes sense to enable it alsofor static libs then anyway.
(probably all the if block can be removed this way, but this is something that upstream has to investigate ;))

thanks!


Gianfranco


Reply to: