Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 684802 - dev-util/apitrace-8.0[system-snappy] - In file included from .../work/apitrace-8.0/lib/os/os_backtrace.cpp:48:0: .../work/apitrace-8.0/thirdparty/libbacktrace/backtrace.h:38:10: fatal error: config.h: No such file or directory
Summary: dev-util/apitrace-8.0[system-snappy] - In file included from .../work/apitrac...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-30 13:21 UTC by Jan Ziak (atomsymbol)
Modified: 2019-05-08 17:04 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (dev-util:apitrace-8.0:20190430-131423.log,71.25 KB, text/plain)
2019-04-30 13:21 UTC, Jan Ziak (atomsymbol)
Details
0001-cmake-fix-out-of-source-build-of-libbacktrace.patch (0001-cmake-fix-out-of-source-build-of-libbacktrace.patch,825 bytes, text/plain)
2019-05-02 12:08 UTC, Alexander Tsoy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Ziak (atomsymbol) 2019-04-30 13:21:09 UTC
Created attachment 574786 [details]
build.log

Hello. apitrace-8.0 fails to build on my machine with the following error message:

FAILED: lib/os/CMakeFiles/os.dir/os_backtrace.cpp.o
/var/tmp/portage/dev-util/apitrace-8.0/work/apitrace-8.0/thirdparty/libbacktrace/backtrace.h:38:10: fatal error: config.h: No such file or directory
 #include "config.h"
          ^~~~~~~~~~

$ emerge -pv --nodeps apitrace
USE="cli egl qt5 system-snappy" ABI_X86="32 (64) -x32" PYTHON_TARGETS="python2_7"
Comment 1 Matt Turner gentoo-dev 2019-04-30 17:17:59 UTC
Cc'ing asturm, since he bumped it (and presumably didn't get this error on his system)
Comment 2 Andreas Sturmlechner gentoo-dev 2019-04-30 18:15:46 UTC
Seems to be a problem with system-snappy.
Comment 3 Jan Ziak (atomsymbol) 2019-04-30 18:42:55 UTC
(In reply to Andreas Sturmlechner from comment #2)
> Seems to be a problem with system-snappy.

I confirm that without system-snappy the package builds successfully.
Comment 4 Alexander Tsoy 2019-05-02 12:08:31 UTC
Created attachment 574930 [details]
0001-cmake-fix-out-of-source-build-of-libbacktrace.patch

There are two issues here:

1. Build system passes all include directories to build commands, e.g.:

[4/110] /usr/bin/x86_64-pc-linux-gnu-gcc -m32 -DHAVE_X11 -D_GNU_SOURCE -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ithirdparty/libbacktrace -I/var/tmp/portage/dev-util/apitrace-8.0-r1/work/apitrace-8.0/thirdparty/libbacktrace -I/var/tmp/portage/dev-util/apitrace-8.0-r1/work/apitrace-8.0/compat -I/var/tmp/portage/dev-util/apitrace-8.0-r1/work/apitrace-8.0/thirdparty/snappy -I/var/tmp/portage/dev-util/apitrace-8.0-r1/work/apitrace-8.0/thirdparty/libbacktrace/auxincl  -DNDEBUG -O2 -march=bdver2 -mtune=bdver2 -mno-tbm -mno-fma4 -mno-xop -mno-lwp -pipe -fvisibility=hidden -Wall -Wno-sign-compare -fno-strict-aliasing -fmessage-length=0 -fno-omit-frame-pointer   -funwind-tables -Wno-switch -Wno-enum-compare -g -MD -MT thirdparty/libbacktrace/CMakeFiles/stest.dir/stest.c.o -MF thirdparty/libbacktrace/CMakeFiles/stest.dir/stest.c.o.d -o thirdparty/libbacktrace/CMakeFiles/stest.dir/stest.c.o -c /var/tmp/portage/dev-util/apitrace-8.0-r1/work/apitrace-8.0/thirdparty/libbacktrace/stest.c

So with USE="-system-snappy" libbacktrace is actually picking config.h from snappy. %)

2. Out of source build is broken, because headers are generated in the binary dir. Attached patch fixes that. But it seems that apitrace requires specific version of snappy and I get the following build errors:

/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/trace/libcommon.a(trace_ostream_snappy.cpp.o): in function `SnappyOutStream::SnappyOutStream(char const*)':                                               
trace_ostream_snappy.cpp:(.text+0x11a): undefined reference to `snappy::MaxCompressedLength(unsigned int)'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/trace/libcommon.a(trace_ostream_snappy.cpp.o): in function `SnappyOutStream::flushWriteCache()':                                                          
trace_ostream_snappy.cpp:(.text+0x285): undefined reference to `snappy::RawCompress(char const*, unsigned int, char*, unsigned int*)'
Comment 5 Andreas Sturmlechner gentoo-dev 2019-05-02 13:22:07 UTC
I've got both upstream patches queued already for apitrace, USE=system-snappy did build fine for me.
Comment 6 Alexander Tsoy 2019-05-02 13:57:07 UTC
Indeed. Exactly the same patch already applied upstream.
Comment 7 Larry the Git Cow gentoo-dev 2019-05-08 17:04:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67630dcc2d0c51e6202ae5bef002e7b85e31f820

commit 67630dcc2d0c51e6202ae5bef002e7b85e31f820
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-05-01 13:36:11 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-05-08 16:59:31 +0000

    dev-util/apitrace: Fix build with system-snappy
    
    Closes: https://bugs.gentoo.org/684802
    Package-Manager: Portage-2.3.66, Repoman-2.3.12
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-util/apitrace/apitrace-8.0.ebuild              |  3 ++
 .../files/apitrace-8.0-system-snappy1.patch        | 21 +++++++++++
 .../files/apitrace-8.0-system-snappy2.patch        | 41 ++++++++++++++++++++++
 3 files changed, 65 insertions(+)