-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues Packing icinga 2.6.3 tar.gz to RPM #5177
Comments
So just to clarify, you are on RHEL6? |
Can you please add the entire build log, starting with the call to rpmbuild and everything until the error occurs? |
Sure, logs are enclosed: |
It is run in RedHat distribution.
|
Well. The boost headers are not installed and as such cmake fails.
|
Unfortunately, the actual problem are our build dependencies on newer Boost. There are two parts in the spec file that cause you problems. Choice 1 - Use Boost 153 (we ship it in our repo)
This is set here: Line 112 in e630614
Choice 2 - Fix deps for Boost 143 (EPEL)We set the actual include path of boost without looking for Line 296 in e630614
|
Icinga 2 does not build with 1.41: /usr/include/boost/range/const_iterator.hpp:37:58: error: no type named 'const_iterator' in 'class boost::intrusive_ptr<icinga::Array>' ... /usr/include/boost/thread/locks.hpp:269:22: error: cannot bind 'boost::unique_lock<boost::mutex>' lvalue to 'boost::unique_lock<boost::mutex>&&' fixes #5188 This also refs #5177 as a partial fix for the dependencies, when not using Icinga's boost packages.
We are going to clean up the dependencies, please see #5189 |
Icinga 2 does not build with 1.41: /usr/include/boost/range/const_iterator.hpp:37:58: error: no type named 'const_iterator' in 'class boost::intrusive_ptr<icinga::Array>' ... /usr/include/boost/thread/locks.hpp:269:22: error: cannot bind 'boost::unique_lock<boost::mutex>' lvalue to 'boost::unique_lock<boost::mutex>&&' Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com> fixes #5188 This also refs #5177 as a partial fix for the dependencies, when not using Icinga's boost packages.
General summary
Scenario I'm working on it is a one where I'm no able to run RPMs because I don't have access to root user. So we provide RPMs to a team that have root access and install it without any option, I guess they simple run "rpm -i package.rpm". It is the reason why we want to build RPM from your tar gz. First of our shoot failed which consist to run with the spec is inside the tar.gz file.
Expected Behavior
As I've haven't changed anything in the spec file I expect the RPM files created without errors.
Current Behavior
It is failing during the creation of the RPM file. Giving this error ouput:
-- Found BISON: /usr/bin/bison (Required is at least version "2.3.0")
-- Found FLEX: 2.5.35 (Required is at least version "2.5.31")
-- MySQL Include dir: /usr/include/mysql library dir: /usr/lib64/mysql
-- MySQL client libraries: mysqlclient
-- Found PostgreSQL: /usr/lib64/libpq.so
-- NOTE: boost::test-based targets and tests cannot be added: boost >= 1.34.0 required but not found. (found: '' want >=103400) BUILD_TESTING disabled, so continuing anyway.
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Boost_INCLUDE_DIR (ADVANCED)
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/third-party/mmatch
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/third-party/yajl/src
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/third-party/execvpe
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/third-party/socketpair
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/tools/mkclass
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/tools/mkembedconfig
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/tools/mkunity
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/base
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/cli
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/config
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/remote
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/remote
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/icinga
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/methods
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/checker
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/compat
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/db_ido
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/db_ido
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/db_ido_mysql
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/db_ido_pgsql
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/livestatus
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/notification
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/lib/perfdata
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/icinga-app
used as include directory in directory /root/rpmbuild/BUILD/icinga2-2.6.3/icinga-app
-- Configuring incomplete, errors occurred!
See also "/root/rpmbuild/BUILD/icinga2-2.6.3/CMakeFiles/CMakeOutput.log".
See also "/root/rpmbuild/BUILD/icinga2-2.6.3/CMakeFiles/CMakeError.log".
error: Bad exit status from /var/tmp/rpm-tmp.2IxdGR (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.2IxdGR (%build)
Steps to Reproduce (for bugs)
cat >/etc/yum.repos.d/devtools-2.repo <<REPO
[testing-devtools-2-centos-$releasever]
name=testing 2 devtools for CentOS $releasever
baseurl=http://people.centos.org/tru/devtools-2/\$releasever/\$basearch/RPMS
gpgcheck=0
REPO
#change repo link
#https://superuser.com/questions/866420/why-doesnt-the-centos-devtools-repo-work-on-redhat
[testing-devtools-2-centos-$releasever]
name=testing 2 devtools for CentOS
baseurl=http://people.centos.org/tru/devtools-2/6/$basearch/RPMS
gpgcheck=0
End Step 1
Install requirements
yum install -y gcc-c++
yum install -y flex
yum install -y bison
yum install -y libstdc++-devel
yum install -y devtoolset-2-gcc devtoolset-2-gcc-c++ devtoolset-2-binutils
yum -y install rpmdevtools
yum -y install boost-devel
rpmdev-setuptree
mkdir ~/tar; cd ~/tar; wget https://github.com/Icinga/icinga2/archive/v2.6.3.tar.gz
cd ~/tar; tar -xvzf v2.6.3.tar.gz
cp ~/tar/icinga2-2.6.3/icinga2.spec ~/rpmbuild/SPECS
cp ~/tar/v2.6.3.tar.gz ~/rpmbuild/SOURCES
export LD_LIBRARY_PATH=/opt/rh/devtoolset-2/root/usr/lib:$LD_LIBRARY_PATH
export PATH=/opt/rh/devtoolset-2/root/usr/bin:$PATH
ln -sf /opt/rh/devtoolset-2/root/usr/bin/ld.bfd /opt/rh/devtoolset-2/root/usr/bin/ld
for file in
find /opt/rh/devtoolset-2/root/usr/include/c++ -name c++config.h
; doecho '#define _GLIBCXX__PTHREADS' >> $file
done
cd ~/rpmbuild/SPECS
rpmbuild -ba icinga2.spec
Context
I'm trying to create RPM file from tar.gz
This is rpmbuild tree:
├── BUILD
│ └── icinga2-2.6.3
├── BUILDROOT
├── RPMS
├── SOURCES
│ └── v2.6.3.tar.gz
├── SPECS
│ └── icinga2.spec
└── SRPMS
I'm following this link to create rpm.
Your Environment
icinga2 --version
): 2.6.3Linux scsblnx-4352025 2.6.32-642.3.1.el6.x86_64 Add notes about certificate permission #1 SMP Sun Jun 26 18:16:44 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: