Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 617644 - sci-mathematics/octave-3.8.2-r3: moc: Invalid argument
Summary: sci-mathematics/octave-3.8.2-r3: moc: Invalid argument
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-06 14:05 UTC by segmentation fault
Modified: 2017-06-11 21:47 UTC (History)
0 users

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


Attachments
Build log for sci-mathematics/octave-3.8.2-r3 (build.log.gz,90.07 KB, application/x-gunzip)
2017-05-07 03:04 UTC, segmentation fault
Details

Note You need to log in before you can comment on or make changes to this bug.
Description segmentation fault 2017-05-06 14:05:01 UTC
Cannot merge octave-3.8.2-r3 due to the following error:

libtool: compile:  i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4/QtCore -I./qterminal/libqterminal -Isrc -I./src -I./src/m-editor -I./src/qtinfo -I../liboctave/cruft/misc -I../liboctave/array -I../liboctave/numeric -I../liboctave/numeric -I../liboctave/operators -I../liboctave/operators -I../liboctave/system -I../liboctave/util -I../libinterp -I../libinterp -I../libinterp/parse-tree -I../libinterp/parse-tree -I../libinterp/corefcn -I../libinterp/corefcn -I../libinterp/octave-value -I../libgnu -I../libgnu -O2 -march=pentium4 -pipe -mieee-fp -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -O2 -march=pentium4 -pipe -pthread -c src/workspace-view.cc  -fPIC -DPIC -o src/.libs/src_libgui_src_la-workspace-view.o
( echo '#ifdef HAVE_CONFIG_H'; echo '#include <config.h>'; echo '#endif'; moc -DHAVE_CONFIG_H -I. -I..  -O2 -march=pentium4 -pipe   src/m-editor/file-editor-interface.h ) > src/m-editor/moc-file-editor-interface.cc-t
( echo '#ifdef HAVE_CONFIG_H'; echo '#include <config.h>'; echo '#endif'; moc -DHAVE_CONFIG_H -I. -I..  -O2 -march=pentium4 -pipe   src/m-editor/file-editor-tab.h ) > src/m-editor/moc-file-editor-tab.cc-t
moc: Invalid argument
Usage: moc [options] <header-file>
  -o<file>           write output to file rather than stdout
  -I<dir>            add dir to the include path for header files
  -E                 preprocess only; do not generate meta object code
  -D<macro>[=<def>]  define macro, with optional definition
  -U<macro>          undefine macro
  -i                 do not generate an #include statement
  -p<path>           path prefix for included file
  -f[<file>]         force #include, optional file name
  -nn                do not display notes
  -nw                do not display warnings
  @<file>            read additional options from file
  -v                 display version of moc


Note: 'moc' is a symlink to 'qtchooser'. I have dev-qt/qtchooser-0_p20151008. I have Qt4, no Qt5.
Comment 1 Alessandro Barbieri 2017-05-07 00:44:00 UTC
Can I see log and CFLAGS?
I had some trouble with octave and moc (basically with the -f switch of moc you can add a custom header, I had -fopenmp in CFLAGS, for some reason them were not filtered out and finished in the moc invocation. Result: #include "openmp" in some files) last week, I solved by emerging automoc. Maybe it should be added as dependency?
Comment 2 Alessandro Barbieri 2017-05-07 00:47:02 UTC
Oh I see that you have -fPIC, I bet this is driving it crazy.
Comment 3 segmentation fault 2017-05-07 03:04:09 UTC
Created attachment 471846 [details]
Build log for sci-mathematics/octave-3.8.2-r3

I attach the build log for octave-3.8.2-r3. 

And here comes the strange thing: after posting the bug, I thought "well, actually I do have octave-3.8.2-r1 already and the reason I wanted to merge was some new version of ImageMagick that caused portage to lament about reverse dependencies. So let me re-compile exactly that version, which I *know* it works".

I found the 3.8.2-r1 ebuild somewhere, put it into a local overlay and started. And now the strange thing: compilation stopped with exactly the same error at exactly the same position! This suggests that it has something to do with my Qt4, rather with octave, or the ebuild. 

But I don't remember touching Qt4, especially since I mask Qt5 and the package that installs moc has a version of 2015...

To put it in perspective: some third party package changed (say, ImageMagick, with a new version, or new flag, I don't remember). Then portage complained about revdep-rebuild. I saw octave in the list and decided to re-merge. Now both a working (installed) ebuild (3.8.2-r1) and a slightly newer one (3.8.2-r3) stop at the same place with an error about moc, a 'Qt version chooser' with a version of 0_p20151008 - old enough and unchanged since 3.8.2-r1 was installed without problems last August...

How can such a thing happen?
Comment 4 segmentation fault 2017-05-07 03:39:11 UTC
...ah, and -fPIC is not the problem, as you can see. I use the 'hardened toolchain', but not the hardened kernel (yet). Problems are very, very rare (mostly "asm operand has impossible constraints", which has to do with the 32bit architecture and can be resolved by a line 

use x86 && append-cflags $(test-flags-CC -fno-stack-check)

in the ebuild, see bug #499996 for a discussion).

The only change between last August and today is the kernel - from 3.16 to 4.9.25. This brought some minimal changes in the packages, namely 

elt-patches-20170317
sys-apps/portage-2.3.3
sys-devel/binutils-2.26.1
dev-util/perf-4.1.5-r1
app-shells/quoter-3.0_p2
app-shells/push-2.0
sys-kernel/genkernel-3.4.52.4-r2
app-portage/eix-0.32.4

and then

sys-kernel/gentoo-sources-4.9.25

This was followed by:

dev-perl/DBD-mysql-4.41.0
x11-libs/qscintilla-2.9.2-r1
dev-util/cmake-3.7.2
media-gfx/imagemagick-6.9.7.4
media-gfx/uniconvertor-2.0_pre379-r1
media-gfx/inkscape-0.91-r3
media-libs/svgalib-1.9.25-r4
app-emulation/virtualbox-modules-5.0.32
app-emulation/virtualbox-5.0.32
x11-drivers/nvidia-drivers-304.135
dev-php/pecl-imagick-3.4.1

and then octave with this problem. The only things that I could suspect in the above list are binutils, quoter, push and cmake. If I had to bet, I would bet on cmake - old version was cmake-3.5.2-r1. I would bet that a change in cmake between 3.5.2-r1 and 3.7.2 causes the working moc of qtchooser-0_p20151008 to break with the error in the log.
Comment 5 segmentation fault 2017-05-07 03:49:58 UTC
...and I do have dev-util/automoc-0.9.88-r1 installed, the current version. Just having it installed does not change anything, so it is probably unrelated. I still bet on cmake... :-)
Comment 6 David Seifert gentoo-dev 2017-06-11 21:47:47 UTC
Removed from tree, reopen if issue persists.

commit 8fc2192f2c98e1de3f9667d4d968141c6df8d55c
Author: David Seifert <soap@gentoo.org>
Date:   Sun Jun 11 23:02:50 2017 +0200

    sci-mathematics/octave: Remove old