Mailinglist Archive: opensuse-packaging (106 mails)

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

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
--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
+ ls -l
total 0
+ cd /usr/src/packages/BUILD
+ rm -rf assimilation-assimilation-official-662be35
+ /usr/bin/gzip -dc
+ /bin/tar -xf -
+ '[' 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
++ dirname
+ /usr/bin/mkdir -p /usr/src/packages/BUILDROOT
+ /usr/bin/mkdir
+ cd assimilation-assimilation-official-662be35

=============== this is the first mkdir/pushd =====================
+ *mkdir -p buil**d*
+ *pushd build*
+ find . -name CMakeLists.txt -exec sed -i -re
/}' '{}' +

=============== 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_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
CMake Error: The source directory
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

Assimilation Systems Limited

Twitter <> Linkedin
<> skype

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

< Previous Next >
Follow Ups