Discussion:
building ports with poudriere with CFLAGS=-O0 -g and no strip
(too old to reply)
Matthias Apitz
2016-08-03 18:36:31 UTC
Permalink
Hello,

I'm re-build some 100 ports in a poudriere jail r292778 amd64 and ports from r414411 with

CFLAGS=-O0 -g
CXXFLAGS=-O0 -g

in the jails make.conf file to nail down or at least get a gdb backtrace
of the astro/stellarium which crashes on start;

Two problems:

The above CFLAGS/CXXFLAGS are fine for all ports, but devel/binutil does
not compile (I can't find some libintl.h header file); I could file a PR
if it is not a known issue already;

I found no way to avoid the strip of the binaries; I ended up with copy
/usr/bin/true to /usr/bin/strip in the jail. What is the right way to do
so with some config value?

Thanks

matthias
--
Matthias Apitz, ✉ ***@unixarea.de, ⌂ http://www.unixarea.de/ ☎ +49-176-38902045
"Wer übersieht, dass wir uns den anderen weggenommen haben und sie uns wiederhaben wollen,
kann von den Kämpfen der letzten Tage keinen verstehen. Und kann natürlich auch keinen
dieser Kämpfe bestehen." Hermann Kant in jW 1.10.1989
Don Lewis
2016-08-03 18:56:49 UTC
Permalink
Post by Matthias Apitz
Hello,
I'm re-build some 100 ports in a poudriere jail r292778 amd64 and ports from r414411 with
CFLAGS=-O0 -g
CXXFLAGS=-O0 -g
in the jails make.conf file to nail down or at least get a gdb backtrace
of the astro/stellarium which crashes on start;
If it is crashing very early, run ldd on the executable and checked to
see if it is linked to both libstdc++ and libc++. My experience is that
it is a fatal combination. This happens if it is using some libraries
containing c++ code compiled with g++, and other libraries containing
c++ code compilied with clang++, or all of the libraries compiled with
one compiler and the application compiled with the other. All of the
c++ code needs to use the same toolchain, which can be a PITA to
untangle, since changing the toolchain for one port can break other
ports that depend on it.
Post by Matthias Apitz
The above CFLAGS/CXXFLAGS are fine for all ports, but devel/binutil does
not compile (I can't find some libintl.h header file); I could file a PR
if it is not a known issue already;
I found no way to avoid the strip of the binaries; I ended up with copy
/usr/bin/true to /usr/bin/strip in the jail. What is the right way to do
so with some config value?
For the latter, put WITH_DEBUG=yes in make.conf. It changes
${STRIP_CMD} from /usr/bin/strip to /bin/true. For ports that set
INSTALL_TARGET to install-strip, it changes the target to install. It
also sets DEBUG_CFLAGS to -g.

For the first issue you might try setting DEBUG_CFLAGS to -O0 -g and not
directly setting CFLAGS and CXXFLAGS.
Matthias Apitz
2016-08-04 05:21:05 UTC
Permalink
Post by Don Lewis
Post by Matthias Apitz
Hello,
I'm re-build some 100 ports in a poudriere jail r292778 amd64 and ports from r414411 with
CFLAGS=-O0 -g
CXXFLAGS=-O0 -g
in the jails make.conf file to nail down or at least get a gdb backtrace
of the astro/stellarium which crashes on start;
If it is crashing very early, run ldd on the executable and checked to
see if it is linked to both libstdc++ and libc++. My experience is that
it is a fatal combination. This happens if it is using some libraries
containing c++ code compiled with g++, and other libraries containing
c++ code compilied with clang++, or all of the libraries compiled with
one compiler and the application compiled with the other. All of the
c++ code needs to use the same toolchain, which can be a PITA to
untangle, since changing the toolchain for one port can break other
ports that depend on it.
Thanks for the hint, but it seems to be fine re/ c++ lib:

$ ldd /usr/local/bin/stellarium | fgrep ++
libc++.so.1 => /usr/lib/libc++.so.1 (0x803e7c000)

When it crashes, it has already done a lot of config stuff and is
putting the GUI on screen; this appears as a small 300x300 pixel window
on screen, knowing already the location, but it can not resize to full
screen. I have a photo of it if someone is interested to see it
off-list.

I want to get a bt to know where to look next.

matthias
--
Matthias Apitz, ✉ ***@unixarea.de, ⌂ http://www.unixarea.de/ ☎ +49-176-38902045
"Wer übersieht, dass wir uns den anderen weggenommen haben und sie uns wiederhaben wollen,
kann von den Kämpfen der letzten Tage keinen verstehen. Und kann natürlich auch keinen
dieser Kämpfe bestehen." Hermann Kant in jW 1.10.1989
Loading...