bugGNU Octave - Bugs: bug #41711, Build fails for libtool:...

 
 

bug #41711: Build fails for libtool: moc-file-editor-interface.cc: PIC: No such file or directory

Submitter:  None
Submitted:  Wed 26 Feb 2014 05:29:58 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Alexander Kolovos Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.8.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 10 Apr 2014 10:42:56 PM UTC, comment #5: 

Apologies for seeing this late; issue was answered up upon last response. Thank you all again

Anonymous
Thu 27 Mar 2014 04:43:57 AM UTC, comment #4: 

Are there still any remaining issues to be solved in this bug report? Please try to limit each bug report to a specific problem, otherwise looking at the discussion here I have no idea what has been resolved and what is still an open problem for you.

Mike Miller <mtmiller>
Group Member
Thu 27 Feb 2014 01:31:33 AM UTC, comment #3: 

Mike and John,

Thank you very much for your quick responses. I greatly appreciate the detailed notes and comments that help me learn more on the way... Here is my feedback after working on the various bits.

1. Indeed, the "-fPIC" option was the redundant element that broke the build. I clearly copied it from a different "configure" statement without knowing where it would lead.

2. The "--with-qhull" option I inserted explicitly during earlier attempts because "configure" was failing to locate the QHull library after manually building the package on the machine. Including the full QHull path in the flags did the trick, instead, and I just never got to remove the older option.

3. The "--enable-shared" option was also a left-over I found from earlier forum searches in the hope of getting Octave to locate some of the other libraries I used.

4. I believe I had just about all corners covered by specifying "--enable-64", particularly after having carefully reviewed the relevant reference that John sent me, too. However. later at the "make check" stage I got a panic in lu.cc, and this prompted me to try out a build without this option; see the end of my message.

Going past the hurdle caused by the "-fPIC" option, I got stuck a couple more times later in the build:

5. The first was caused by getting a core dump upon execution of:
lrelease -qm languages/be_BY.qm languages/be_BY.ts
I searched a bit, found that it is Qt4 related, but I have no idea what may have caused it to produce a segmentation fault on my system. I simply skipped over this part by blanking out the LOCALES= arguments in line 2084 and commenting out lines 4006-4008 in the libgui Makefile.

6. The last obstacle was my LaTeX default settings: While building the documentation, I got at some point the following error:
./octave.aux:4743: TeX capacity exceeded, sorry [save size=5000].
I searched and fixed it by going to line 526 of "/usr/share/texmf/web2c/texmf.cnf" and increasing the default limit of save_size. A 10x increase from 5000 to 50000 worked more than fine.

Finally, I ran "make check" and got the following results:
  PASS     11463
  FAIL         2
  XFAIL        7
  SKIPPED     58
The failed tests reported were:
  scripts/sparse/svds.m ............... PASS    5/6    FAIL 1
  scripts/testfun/assert.m ............ PASS   87/88   FAIL 1
and the skipped functions (clearly, due to skipping the Magick++ and JIT dependencies) are:
gui: uimenu
image: imformats, imread
optimization: qp
util: copyobj, findall, graphics_tookit
and the jit.tst

Many thanks again,
Alexander.

Anonymous
Wed 26 Feb 2014 06:27:27 PM UTC, comment #2: 

You are setting some other options in the configure command that are defaults, like --with-qhull and --enable-shared.

Also, are you sure you need --enable-64?  Have you read

http://www.gnu.org/software/octave/doc/interpreter/Compiling-Octave-with-64_002dbit-Indexing.html#Compiling-Octave-with-64_002dbit-Indexing

and have you built all the dependencies to also use 64-bit integers for indexing?

John W. Eaton <jwe>
Group administrator
Wed 26 Feb 2014 05:54:11 PM UTC, comment #1: 

Hi, thanks for your bug report. I think this falls under user error due to your use of the -fPIC option in CPPFLAGS. Please try removing that option from your configure line and report back if that allows your build to succeed.

Now, the specific reason for the error in this case is that -fPIC isn't really a preprocessor option, it's a compilation option. So it shouldn't be in CPPFLAGS, it should rather be in CFLAGS/CXXFLAGS/FFLAGS. But one of the advantages of using libtool is that it figures this stuff out on its own, so you really don't need to specify -fPIC at all.

Lastly, Octave is passing all preprocessor options on to the moc command, which only understands the basics: -I, -D, and -U. The -f option to moc means "add an explicit #include for the following file", which is exactly what you're seeing.

Mike Miller <mtmiller>
Group Member
Wed 26 Feb 2014 05:29:58 PM UTC, original submission:  

Unsure whether this is a bug, a system-related issue, or my bad; please advise.

I am attempting to build Octave 3.8.0 (also verified the issue on v.3.8.1 RC3) on SUSE Linux Enterprise Server (SLES) 11 SP1.

I use the following to configure the build:

./configure CPPFLAGS="-fPIC -I/usr/include -I/usr/share/qhull-2012.1/src" CFLAGS="-I/usr/share/qhull-2012.1/src" LDFLAGS="-L/usr/lib64 -L/usr/local/lib -L/usr/lib" LD_LIBRARY_PATH="/usr/lib64" --enable-float --enable-shared --enable-64 --with-fftw3=yes --with-qhull


The build continues well for a while until it comes to libtool, and specifically the M-editor interface. After MOC creates the "moc-file-editor-interface.cc" file, compilation produces an error about the #include statement on line 13 of this file where it is specified:

#include "PIC"


The build output from the creation of the "moc-file-editor-interface.cc" file and onwards is appended at the bottom of my message. I only once found the same error appearing on posts online but was unable to find how it was resolved. Could it be my SLES11-SP1 installation lacks some library or tweak? What am I possibly doing wrong?

Thanks,
Alexander.


( echo '#ifdef HAVE_CONFIG_H'; echo '#include <config.h>'; echo '#endif'; moc -DHAVE_CONFIG_H -I. -I..   -fPIC -I/usr/include -I/usr/share/qhull-2012.1/src   src/m-editor/file-editor-interface.h ) > src/m-editor/moc-file-editor-interface.cc-t
mv src/m-editor/moc-file-editor-interface.cc-t src/m-editor/moc-file-editor-interface.cc
/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..   -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtNetwork -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 -fPIC -I/usr/include -I/usr/share/qhull-2012.1/src  -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -pthread -MT src/m-editor/src_libgui_src_la-moc-file-editor-interface.lo -MD -MP -MF src/m-editor/.deps/src_libgui_src_la-moc-file-editor-interface.Tpo -c -o src/m-editor/src_libgui_src_la-moc-file-editor-interface.lo `test -f 'src/m-editor/moc-file-editor-interface.cc' || echo './'`src/m-editor/moc-file-editor-interface.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtNetwork -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 -fPIC -I/usr/include -I/usr/share/qhull-2012.1/src -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -pthread -MT src/m-editor/src_libgui_src_la-moc-file-editor-interface.lo -MD -MP -MF src/m-editor/.deps/src_libgui_src_la-moc-file-editor-interface.Tpo -c src/m-editor/moc-file-editor-interface.cc  -fPIC -DPIC -o src/m-editor/.libs/src_libgui_src_la-moc-file-editor-interface.o
src/m-editor/moc-file-editor-interface.cc:13:15: error: PIC: No such file or directory
src/m-editor/moc-file-editor-interface.cc:15:2: error: #error "The header file 'file-editor-interface.h' doesn't include <QObject>."
src/m-editor/moc-file-editor-interface.cc:23: error: expected constructor, destructor, or type conversion before 'static'
src/m-editor/moc-file-editor-interface.cc:68: error: 'QMetaObject' does not name a type
src/m-editor/moc-file-editor-interface.cc:77: error: expected initializer before '*' token
src/m-editor/moc-file-editor-interface.cc:82: error: 'file_editor_interface' has not been declared
src/m-editor/moc-file-editor-interface.cc: In function 'void* qt_metacast(const char*)':
src/m-editor/moc-file-editor-interface.cc:85: error: 'strcmp' was not declared in this scope
src/m-editor/moc-file-editor-interface.cc:86: error: expected type-specifier before 'file_editor_interface'
src/m-editor/moc-file-editor-interface.cc:86: error: expected `>' before 'file_editor_interface'
src/m-editor/moc-file-editor-interface.cc:86: error: expected `(' before 'file_editor_interface'
src/m-editor/moc-file-editor-interface.cc:86: error: 'file_editor_interface' was not declared in this scope
src/m-editor/moc-file-editor-interface.cc:86: error: expected primary-expression before '>' token
src/m-editor/moc-file-editor-interface.cc:86: error: invalid use of 'this' in non-member function
src/m-editor/moc-file-editor-interface.cc:86: error: expected `)' before ';' token
src/m-editor/moc-file-editor-interface.cc:87: error: 'octave_dock_widget' has not been declared
src/m-editor/moc-file-editor-interface.cc: At global scope:
src/m-editor/moc-file-editor-interface.cc:90: error: 'file_editor_interface' has not been declared
src/m-editor/moc-file-editor-interface.cc:90: error: 'QMetaObject' has not been declared
src/m-editor/moc-file-editor-interface.cc:90: error: expected primary-expression before 'int'
src/m-editor/moc-file-editor-interface.cc:90: error: expected primary-expression before 'void'
src/m-editor/moc-file-editor-interface.cc:90: error: initializer expression list treated as compound expression
src/m-editor/moc-file-editor-interface.cc:91: error: expected ',' or ';' before '{' token
make[3]: *** [src/m-editor/src_libgui_src_la-moc-file-editor-interface.lo] Error 1
make[3]: Leaving directory `/usr/share/octave-3.8.1-rc3/libgui'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/share/octave-3.8.1-rc3/libgui'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/share/octave-3.8.1-rc3'
make: *** [all] Error 2


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-04-10 mtmiller StatusNeed Info Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2014-02-26 mtmiller StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-aa77.
    Corresponding source code