[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45578] build failure due to no dependency on
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #45578] build failure due to no dependency on libgnu |
Date: |
Sun, 30 Aug 2015 23:12:23 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0 |
Follow-up Comment #6, bug #45578 (project octave):
@Mike: I think this has uncovered something rather fundamental. The old build
system was serialized by directory and in each directory the dependencies were
correctly specified for make. But now that all files in all directories can
potentially be made in parallel there are a lot of dependencies that have yet
to be specified.
The old SUBDIRS variable (in octave-stable) was
SUBDIRS = libgnu liboctave libinterp libgui
which built libgnu before everything.
Now it is just
SUBDIRS = libgnu
which seems to allow things that don't "depend" on libgnu like libinterp to
run whenever they can be scheduled. But of course, libinterp does depend on
gnulib. If I use "grep gnulib::" in libinterp I find 82 instances such as
this one in rand.cc:
corefcn/rand.cc: gnulib::floor (rvec[i] *
(n - i));
gnulib is segregated with it's own system for constructing a Makefile, etc. I
think it will be easier for maintenance purposes to preserve that separation
and just add some sort of ordering rule or dependency to create libgnu before
the rest of the build. My attempt, added to Makefile.am, is shown below.
SUBDIRS = libgnu
+# All of build depends on having libgnu.
+# Add the library to BUILT_SOURCES so it is created early in the build
process
+
+BUILT_SOURCES += libgnu/libgnu.la
+
+libgnu/libgnu.la:
+ cd libgnu; $(MAKE) all
+
It doesn't work perfectly however. I think because BUILT_SOURCES may only
apply when something like 'make all' is used.
The example you discovered, 'make src/octave-gui', is an excellent test bench.
I used 'make dist' to create a tar ball and then unpacked it into a temporary
source directory. I then switched to a build directory and configured using
the temporary source directory. When I try to create src/octave-gui I
repeatedly ran into unmet dependencies. See below the errors, and what
command I used to overcome them.
In file included from ../octave-4.1.0+/liboctave/util/lo-regexp.h:32:0,
from ../octave-4.1.0+/libinterp/corefcn/symtab.h:34,
from ../octave-4.1.0+/libinterp/corefcn/load-save.h:30,
from ../octave-4.1.0+/libgui/src/files-dock-widget.cc:48:
../octave-4.1.0+/liboctave/array/Matrix.h:34:20: fatal error: mx-ops.h: No
such file or directory
make liboctave/operators/mx-ops.h
--------------------------------------------------------------------------------
../octave-4.1.0+/libgui/src/m-editor/file-editor-tab.cc:61:21: fatal error:
version.h: No such file or directory
make libinterp/version.h
--------------------------------------------------------------------------------
In file included from ../octave-4.1.0+/liboctave/array/Matrix.h:34:0,
from ../octave-4.1.0+/liboctave/util/lo-regexp.h:32,
from ../octave-4.1.0+/libinterp/corefcn/symtab.h:34,
from ../octave-4.1.0+/libinterp/corefcn/load-save.h:30,
from ../octave-4.1.0+/libgui/src/files-dock-widget.cc:48:
./liboctave/operators/mx-ops.h:4:23: fatal error: mx-cdm-dm.h: No such file or
directory
compilation terminated.
make: *** [libgui/src/libgui_src_libgui_src_la-files-dock-widget.lo] Error 1
make: *** Waiting for unfinished jobs....
mv -f libgui/src/m-editor/.deps/libgui_src_libgui_src_la-file-editor-tab.Tpo
libgui/src/m-editor/.deps/libgui_src_libgui_src_la-file-editor-tab.Plo
make liboctave/operators/mx-cdm-dm.h
--------------------------------------------------------------------------------
../octave-4.1.0+/libgui/src/settings-dialog.cc:31:32: fatal error:
ui-settings-dialog.h: No such file or directory
compilation terminated.
make ./libgui/src/ui-settings-dialog.h
--------------------------------------------------------------------------------
../octave-4.1.0+/libgui/src/thread-manager.cc: In function 'void
block_or_unblock_signal(int, int)':
../octave-4.1.0+/libgui/src/thread-manager.cc:115:3: error: 'gnulib' has not
been declared
../octave-4.1.0+/libgui/src/thread-manager.cc:117:3: error: 'gnulib' has not
been declared
make: *** [libgui/src/libgui_src_libgui_src_la-thread-manager.lo] Error 1
make: *** Waiting for unfinished jobs....
make -C libgnu all
--------------------------------------------------------------------------------
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../octave-4.1.0+
-I/usr/include/freetype2 -I/usr/include/qt4 -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtGui -I/usr/include/qt4/QtNetwork
-I/usr/include/qt4/QtOpenGL -Ilibgui/graphics
-I../octave-4.1.0+/libgui/graphics -Isrc -I../octave-4.1.0+/libgui/src
-I../octave-4.1.0+/liboctave/cruft/misc -I../octave-4.1.0+/liboctave/array
-I./liboctave/numeric -I../octave-4.1.0+/liboctave/numeric
-I./liboctave/operators -I../octave-4.1.0+/liboctave/operators
-I../octave-4.1.0+/liboctave/system -I../octave-4.1.0+/liboctave/util
-I./libinterp -I../octave-4.1.0+/libinterp -I./libinterp/parse-tree
-I../octave-4.1.0+/libinterp/parse-tree -I./libinterp/corefcn
-I../octave-4.1.0+/libinterp/corefcn -I../octave-4.1.0+/libinterp/octave-value
-pthread -fopenmp -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith
-Wwrite-strings -Wcast-align -Wcast-qual -O2 -pipe -MT
libgui/graphics/libgui_graphics_libgui_graphics_la-__init_qt__.lo -MD -MP -MF
libgui/graphics/.deps/libgui_graphics_libgui_graphics_la-__init_qt__.Tpo -c
../octave-4.1.0+/libgui/graphics/__init_qt__.cc -fPIC -DPIC -o
libgui/graphics/.libs/libgui_graphics_libgui_graphics_la-__init_qt__.o
../octave-4.1.0+/libgui/graphics/__init_qt__.cc:34:22: fatal error:
graphics.h: No such file or directory
compilation terminated.
make: *** [libgui/graphics/libgui_graphics_libgui_graphics_la-__init_qt__.lo]
Error 1
make: *** Waiting for unfinished jobs....
make libinterp/corefcn/graphics.h
--------------------------------------------------------------------------------
../octave-4.1.0+/libgui/graphics/annotation-dialog.cc:28:34: fatal error:
ui-annotation-dialog.h: No such file or directory
compilation terminated.
make: ***
[libgui/graphics/libgui_graphics_libgui_graphics_la-annotation-dialog.lo]
Error 1
make: *** Waiting for unfinished jobs....
make libgui/graphics/ui-annotation-dialog.h
--------------------------------------------------------------------------------
Some of them are rather obvious. The code
libgui/src/m-editor/file-editor-tab.cc includes version.h, but version.h is a
generated file in libinterp and there is no dependency written in the
libgui/module.mk file. Is there an automated way to discover these
dependencies? The source code will obviously change and having to manually
track these dependencies across directories seems awkward.
(file #34771, file #34772)
_______________________________________________________
Additional Item Attachment:
File name: build_libgnu.cset Size:0 KB
File name: bad_build.notes Size:4 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45578>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45578] build failure due to no dependency on libgnu,
Rik <=