Forum

Compile error for 10.4 on CentOS 7 using make_redhat_package

AxAn
3 November 2016, 17:36
Hi,

I have been using Hiawatha for a while on CentOS 7 and always compiled it using make_redhat_package. Version 10.3 works without a problem but 10.4 ends with this:

-- Removed runtime path from "/root/rpmbuild/BUILDROOT/hiawatha-10.4-1.el7.centos.x86_64/usr/lib64/hiawatha/libmbedx509.so.2.3.0"
-- Installing: /root/rpmbuild/BUILDROOT/hiawatha-10.4-1.el7.centos.x86_64/usr/lib64/hiawatha/libmbedcrypto.so.2.3.0
-- Installing: /root/rpmbuild/BUILDROOT/hiawatha-10.4-1.el7.centos.x86_64/usr/lib64/hiawatha/libmbedcrypto.so.0
-- Installing: /root/rpmbuild/BUILDROOT/hiawatha-10.4-1.el7.centos.x86_64/usr/lib64/hiawatha/libmbedcrypto.so
+ mkdir -p /root/rpmbuild/BUILDROOT/hiawatha-10.4-1.el7.centos.x86_64/usr/share/doc/hiawatha
+ cp ChangeLog /root/rpmbuild/BUILDROOT/hiawatha-10.4-1.el7.centos.x86_64/usr/share/doc/hiawatha
+ mkdir -p /root/rpmbuild/BUILDROOT/hiawatha-10.4-1.el7.centos.x86_64/etc/rc.d/init.d
+ cp extra/debian/init.d/hiawatha /root/rpmbuild/BUILDROOT/hiawatha-10.4-1.el7.centos.x86_64/etc/rc.d/init.d
cp: cannot stat 'extra/debian/init.d/hiawatha': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.mtrXi5 (%install)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.mtrXi5 (%install)


I know that you cannot compile and test for all platforms but do have any clue on what might cause this?
Must be something new (Systemd init script?) in 10.4 since 10.3 compiles without any problem.

the only things that says something negative before the fail are these lines:
-- Looking for rpcsvc/crypt.h - not found
-- Looking for strnstr - not found
-- Looking for strncasestr - not found
-- Looking for SO_ACCEPTFILTER - not found

Hugo Leisink
4 November 2016, 00:23
Change line 37 of extra/redhat/hiawatha.spec to
cp extra/redhat/hiawatha %{buildroot}%{_initrddir}

Does that solve your issue?
AxAn
4 November 2016, 08:27
Yes, indeed it did solve the issue.
AxAn
4 November 2016, 09:43
...but I ran into some more problems when trying to install 10.4:

[root@devel x86_64]# rpm -Uvh hiawatha-10.4-1.el7.centos.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:hiawatha-10.4-1.el7.centos warning: /etc/hiawatha/hiawatha.conf saved as /etc/hiawatha/hiawatha.conf.rpmsave
################################# [ 50%]
Executable file /usr/local/sbin/hiawatha not found. Exiting.
Cleaning up / removing...
2:hiawatha-9.12-1.el7.centos ################################# [100%]


I was testing this on an older virtual test-server that had Hiawatha 9.12 installed. I restored a snapshot of the server before the 10.4 install and tried to install 10.3:

[root@devel x86_64]# rpm -Uvh hiawatha-10.3-1.el7.centos.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:hiawatha-10.3-1.el7.centos warning: /etc/hiawatha/hiawatha.conf saved as /etc/hiawatha/hiawatha.conf.rpmsave
################################# [ 50%]
Stopping webserver: Hiawatha
Starting webserver: Hiawatha
Cleaning up / removing...
2:hiawatha-9.12-1.el7.centos ################################# [100%]


Eveything worked fine.

I then tried to upgrade the 10.3 to 10.4:
[root@devel x86_64]# rpm -Uvh hiawatha-10.4-1.el7.centos.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:hiawatha-10.4-1.el7.centos ################################# [ 50%]
Executable file /usr/local/sbin/hiawatha not found. Exiting.
Cleaning up / removing...
2:hiawatha-10.3-1.el7.centos ################################# [100%]


I'm unsure in what state this left the server since the command "service hiawatha status" does not work anymore, I get no response on port 80 and "hiawatha -v" reports 10.4.
This topic has been closed.