Modify

Opened 8 weeks ago

Last modified 7 weeks ago

#13085 new Bug Report - General

Fedora 24 -> 26: RPM build error: fatal error: stdlib.h: No such file or directory

Reported by: udovdh@… Owned by:
Priority: minor Milestone: needs_triage
Component: MythTV - General Version: 0.28.1
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Another issue that popped up after the Fedora 24 -> Fedora 26 upgrade is this one. After being able to compile 0.27.6 without issue I checked out fixes/0.28. Trying to build 0.28 gives the error pasted below. When I replace all -isystem mentions by -I in all Makefiles the compilation succeeds.

make[2]: Entering directory '/usr/src/redhat/BUILD/mythtv-0.28.1/mythtv/external/libmythsoundtouch'
g++ -c -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -march=k8 -mtune=k8 -msse -msse2 -msse3 -m3dnow -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-stron
g --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -fomit-frame-pointer -fPIC -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -pthread -Wpointer-arith -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -fvisibility-
inlines-hidden -Wmissing-declarations -Wno-switch -Woverloaded-virtual -funit-at-a-time -fPIC -std=gnu++11 -w -D_REENTRANT -DMMX -Dusing_libcec -D_GNU_SOURCE -DALLOW_SSE2 -DALLOW_SSE3 -I. -isystem /usr/inclu
de/libxml2 -isystem /usr/include -I. -I../.. -I/usr/lib64/qt5/mkspecs/linux-g++ -o AAFilter.o AAFilter.cpp
g++ -c -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -march=k8 -mtune=k8 -msse -msse2 -msse3 -m3dnow -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-stron
g --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -fomit-frame-pointer -fPIC -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -pthread -Wpointer-arith -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -fvisibility-
inlines-hidden -Wmissing-declarations -Wno-switch -Woverloaded-virtual -funit-at-a-time -fPIC -std=gnu++11 -w -D_REENTRANT -DMMX -Dusing_libcec -D_GNU_SOURCE -DALLOW_SSE2 -DALLOW_SSE3 -I. -isystem /usr/inclu
de/libxml2 -isystem /usr/include -I. -I../.. -I/usr/lib64/qt5/mkspecs/linux-g++ -o FIRFilter.o FIRFilter.cpp
In file included from /usr/include/c++/7/ext/string_conversions.h:41:0,
                 from /usr/include/c++/7/bits/basic_string.h:6159,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/stdexcept:39,
                 from FIRFilter.cpp:46:
/usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
               ^~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:369: FIRFilter.o] Error 1
make[2]: Leaving directory '/usr/src/redhat/BUILD/mythtv-0.28.1/mythtv/external/libmythsoundtouch'
make[1]: *** [Makefile:66: libmythsoundtouch-all] Error 2
make[1]: *** Waiting for unfinished jobs....

Attachments (0)

Change History (4)

comment:1 Changed 8 weeks ago by udovdh@…

It looks like only -isystem /usr/include needs to be changed into -I /usr/include. (i.e.: not all -isystem but this needs further testing)

comment:2 Changed 8 weeks ago by J.Pilk@…

I had built rpms of 30pre3 for my SL7x and f25 boxes, and realised that I ought to be able to do the same for f26. It worked - but I don't have an f26 box. The others are working fine.

$ mock -r fedora-25-x86_64-rpmfusion_free --buildsrpm --spec mythtvmasterexfusion30pre3mock.spec --sources=../SOURCES

$ mock -r fedora-26-x86_64-rpmfusion_nonfree --rebuild mythtv-master-30.3.a.fc25.src.rpm

I don't think the _nonfree repo is needed, but this was a test. For some reason the SL7x build pulled in a couple of nvidia-related packages, but the log shows none here.

comment:3 Changed 8 weeks ago by udovdh@…

I received a tip from Jonatan Lindblad to remove the line as shown at https://github.com/MythTV/packaging/blob/master/rpm/mythtv.spec#L931. This change makes mythtv compile but not yet the plugins that still fail with the stdlib.h error.

For the plugins an INCLUDEPATH is modified during the rpmbuild process: + echo 'INCLUDEPATH -= $${PREFIX}/include' + echo 'INCLUDEPATH -= $${SYSROOT}/$${PREFIX}/include' + echo 'INCLUDEPATH -= /usr/include' + echo 'INCLUDEPATH += /root/rpmbuild/BUILD/mythtv-0.28.1/temp/usr/include' + echo 'INCLUDEPATH += /usr/include'

In the resulting lines during the compile we can see that Qmake treats /usr/include differently from /root/rpmbuild/BUILD/mythtv-0.28.1/temp/usr/include w.r.t -isystem and -I. How can we influence this behaviour?

comment:4 Changed 7 weeks ago by udovdh@…

Or can someone please explain why the include-files on Fedora 26 do not work in a way that stdlib.h is found when configureing with -isystem stdlib.h ?

Add Comment

Modify Ticket

Action
as new The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.