Indeed, I'm getting really fed up with it.
I have very rudimentary (almost non-existent) knowledge of makefiles and the general build process. All I know is the methodology to create a Debian package.
From what I can tell, what trips me up is this: in the rules file, I need to add these two lines under override_dh_auto_configure:
Code: Select all
dh_auto_configure -- $(extra_flags)
cp -f src/Build/Version.h obj-$(DEB_BUILD_GNU_TYPE)/src/Build/Version.h
Code: Select all
make[4] : entering directory « /home/normand2/build/freecad-0.18/debian/build-py2 »
[ 61%] Building CXX object src/Mod/Import/App/CMakeFiles/Import.dir/dxf.cpp.o
cd /home/normand2/build/freecad-0.18/debian/build-py2/src/Mod/Import/App && /usr/bin/ccache /usr/bin/c++ -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DImport_EXPORTS -DQT_CORE_LIB -DQT_NO_DEBUG -DQT_XML_LIB -D_OCC64 -I/home/normand2/build/freecad-0.18/debian/build-py2 -I/home/normand2/build/freecad-0.18/debian/build-py2/src -I/home/normand2/build/freecad-0.18/src -I/home/normand2/build/freecad-0.18/debian/build-py2/src/Mod/Import/App -I/usr/include/occt -I/usr/include/python2.7 -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -Wall -Wextra -Wno-write-strings -Wall -DHAVE_SWIG=1 -fpermissive -g -O2 -fdebug-prefix-map=/home/normand2/build/freecad-0.18=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++11 -D_OCC64 -O2 -g -DNDEBUG -fPIC -I/usr/include/openmpi -I/usr/include/hdf5/openmpi -pthread -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fPIC -std=gnu++11 -o CMakeFiles/Import.dir/dxf.cpp.o -c /home/normand2/build/freecad-0.18/src/Mod/Import/App/dxf.cpp
/home/normand2/build/freecad-0.18/src/Mod/Import/App/dxf.cpp:14:10: fatal error: src/Build/Version.h: No file or folder of this type
#include <src/Build/Version.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
src/Mod/Import/App/CMakeFiles/Import.dir/build.make:266: recipe for target 'src/Mod/Import/App/CMakeFiles/Import.dir/dxf.cpp.o' failed
make[4]: *** [src/Mod/Import/App/CMakeFiles/Import.dir/dxf.cpp.o] Error 1
Maybe I'm not doing it correctly in the rules file?
Here's how I added it, I tried adding it first then last as below:
Code: Select all
override_dh_auto_configure:
dh_auto_configure --builddirectory=debian/build-py2 -- \
$(extra_flags) \
$(py2_flags)
dh_auto_configure --builddirectory=debian/build-py3 -- \
$(extra_flags) \
$(py3_flags)
dh_auto_configure -- $(extra_flags)
cp -f src/Build/Version.h obj-$(DEB_BUILD_GNU_TYPE)/src/Build/Version.h