Mailinglist Archive: opensuse-packaging (106 mails)

< Previous Next >
[opensuse-packaging] I'm having a problem building packages for openSUSE...
Hi,

I had a potential user ask me to provide the Assimilation project
software for openSUSE. So, I started down that path to see if I could
help him out. We have a good method of building packages for different
distros using Docker - so that's what I did.

I started with the Dockerfile I use to build CentOS and Fedora, but I
ran into troubles on the 42.1 build. This is the version I get when I
say "opensuse:latest" on Docker.

Our code builds with cmake, not autotools.

What's happens is that rpmbuild does a mkdir build, cd/pushd build
twice. And then it invokes cmake with "*..*" as its argument. Either it
needs to not do the mkdir/cd twice (which is what I suspect), or it
needs to invoke cmake with "*../..*" as its argument. My annotations are
on lines with ========= in them...

Any idea what's going on here, and how I can work around this?

Below is the output from the rpmbuild process...


Step 24 : RUN rpmbuild -ba
/root/assimilation/src/docker/CentOS6/assimilation-cma.spec
--define="assimversion $GITPATH"
---> Running in 54a609390b06
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.uT0G2n
+ umask 022
+ cd /usr/src/packages/BUILD
+ /bin/pwd
/usr/src/packages/BUILD
+ ls -l
total 0
+ cd /usr/src/packages/BUILD
+ rm -rf assimilation-assimilation-official-662be35
+ /usr/bin/gzip -dc
/usr/src/packages/SOURCES/assimilation-assimilation-official-662be35.tgz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd assimilation-assimilation-official-662be35
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.S47KBW
+ umask 022
+ cd /usr/src/packages/BUILD
+ /usr/bin/rm -rf
/usr/src/packages/BUILDROOT/assimilation-cma-1.1.1-0.30.x86_64
++ dirname
/usr/src/packages/BUILDROOT/assimilation-cma-1.1.1-0.30.x86_64
+ /usr/bin/mkdir -p /usr/src/packages/BUILDROOT
+ /usr/bin/mkdir
/usr/src/packages/BUILDROOT/assimilation-cma-1.1.1-0.30.x86_64
+ cd assimilation-assimilation-official-662be35

=============== this is the first mkdir/pushd =====================
+ *mkdir -p buil**d*
+ *pushd build*
/usr/src/packages/BUILD/assimilation-assimilation-official-662be35/build
/usr/src/packages/BUILD/assimilation-assimilation-official-662be35
+ find . -name CMakeLists.txt -exec sed -i -re
'/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\)/{s/^/#IGNORE
/}' '{}' +

=============== this is the second (extra/incorrect) mkdir/cd ============
+ *mkdir -p build*
+ *cd build*

=============== Here is the cmake that is going to fail ==========
[0m+***/usr/bin/cmake* *..* -DCMAKE_INSTALL_PREFIX:PATH=/usr
-DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64
-DINCLUDE_INSTALL_DIR:PATH=/usr/include
-DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc
-DSHARE_INSTALL_PREFIX:PATH=/usr/share -DCMAKE_BUILD_TYPE=None
'-DCMAKE_C_FLAGS=-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2
-fstack-protector -funwind-tables -fasynchronous-unwind-tables -DNDEBUG'
'-DCMAKE_CXX_FLAGS=-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2
-fstack-protector -funwind-tables -fasynchronous-unwind-tables -DNDEBUG'
'-DCMAKE_Fortran_FLAGS=-O2 -g -m64 -fmessage-length=0
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -DNDEBUG'
'-DCMAKE_EXE_LINKER_FLAGS=-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now'
'-DCMAKE_MODULE_LINKER_FLAGS=-Wl,--as-needed -Wl,--no-undefined
-Wl,-z,now' '-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--as-needed
-Wl,--no-undefined -Wl,-z,now' -DLIB_SUFFIX=64
-DCMAKE_SKIP_RPATH:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF
-DCMAKE_COLOR_MAKEFILE:BOOL=OFF -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF
-DCMAKE_MODULES_INSTALL_DIR=/usr/share/cmake/Modules
-DCMAKE_USER_MAKE_RULES_OVERRIDE=/usr/share/cmake/Modules/opensuse_rules.cmake
.. -DCMAKE_SKIP_BUILD_RPATH=1
CMake Error: The source directory
"/usr/src/packages/BUILD/assimilation-assimilation-official-662be35/build"
does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
error: Bad exit status from /var/tmp/rpm-tmp.S47KBW (%build)
 Bad exit status from /var/tmp/rpm-tmp.S47KBW (%build)


RPM build errors:
time="2015-12-01T19:40:46-07:00" level=info msg="The command [/bin/sh -c
rpmbuild -ba /root/assimilation/src/docker/CentOS6/assimilation-cma.spec
--define=\"assimversion $GITPATH\"] returned a non-zero code: 1"


What you find if you look at the directory structure is that in the
source directory there is a directory named build, and under it is
another directory named build. This matches the log information above,
and the behavior I saw. Here's a summary of what happened:
- mkdir -p build
- pushd build
- mkdir -p build
- cd build

Build fails because the CMakeLists.txt file is named
"../../CMakeLists.txt", NOT "../CMakeLists.txt"




--

Alan Robertson / CTO
AlanR@xxxxxxxxxxxxxxxxxxxxxxx <mailto:AlanR@xxxxxxxxxxxxxxxxxxxxxxx>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups