i try build up-imapproxy on fedora 26 but it failed - can you please fix it?
[dsoft@srv:~/rpmbuild/SPECS]$ rpmbuild -bb up-imapproxy.spec
Ausführung(%prep): /bin/sh -e /var/tmp/rpm-tmp.mojWSU
- umask 022
- cd /home/dsoft/rpmbuild/BUILD
- cd /home/dsoft/rpmbuild/BUILD
- rm -rf squirrelmail.imap_proxy
- /usr/bin/bzip2 -dc /home/dsoft/rpmbuild/SOURCES/squirrelmail-20170818_0200-SVN.imap_proxy.tar.bz2
- /usr/bin/tar -xof -
- STATUS=0
- '[' 0 -ne 0 ']'
- cd squirrelmail.imap_proxy
- /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
- exit 0
Ausführung(%build): /bin/sh -e /var/tmp/rpm-tmp.v8yNQu
- umask 022
- cd /home/dsoft/rpmbuild/BUILD
- cd squirrelmail.imap_proxy
- export 'CFLAGS=-m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack'
- CFLAGS='-m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack'
- export 'CXXFLAGS=-m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack'
- CXXFLAGS='-m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack'
- export 'CC=gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack'
- CC='gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack'
- export 'LDFLAGS=-Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -pie -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack'
- LDFLAGS='-Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -pie -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack'
- CFLAGS='-m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack'
- export CFLAGS
- CXXFLAGS='-m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack'
- export CXXFLAGS
- FFLAGS='-m64 -march=core2 -mtune=core2 -I/usr/lib64/gfortran/modules'
- export FFLAGS
- FCFLAGS='-m64 -march=core2 -mtune=core2 -I/usr/lib64/gfortran/modules'
- export FCFLAGS
- LDFLAGS='-Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -pie -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack'
- export LDFLAGS
- ./configure --host=x86_64-redhat-linux --build=x86_64-redhat-linux --target=x86_64-redhat-linux --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man ' '
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type:
checking whether make sets $(MAKE)... yes
checking for x86_64-redhat-linux-gcc... gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack accepts -g... yes
checking for gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack option to accept ANSI C... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu
checking target system type... x86_64-redhat-linux-gnu
checking for connect... yes
checking for pthread_create in -lpthread... yes
checking for mmap... yes
checking for yp_get_default_domain in -lnsl... yes
checking for request_init in -lwrap... yes
checking for EVP_DigestInit in -lcrypto... yes
checking for SSL_new in -lssl... yes
checking for initscr in -lcurses... yes
checking how to run the C preprocessor... gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for unistd.h... (cached) yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for typedef nfds_t... yes
checking for an ANSI C-conforming const... yes
checking whether gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack needs -traditional... no
checking return type of signal handlers... void
checking for socket... yes
checking for poll... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing default commands
- make -j8
gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -I. -I./include -c -o src/icc.o src/icc.c
gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -I. -I./include -c -o src/main.o src/main.c
gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -I. -I./include -c -o src/imapcommon.o src/imapcommon.c
gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -I. -I./include -c -o src/request.o src/request.c
gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -I. -I./include -c -o src/hash.o src/hash.c
gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -I. -I./include -c -o src/becomenonroot.o src/becomenonroot.c
gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -I. -I./include -c -o src/config.o src/config.c
gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -I. -I./include -c -o src/logging.o src/logging.c
gcc -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -m64 -march=core2 -mtune=core2 -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -I. -I./include -c -o src/threads.o src/threads.c
src/imapcommon.c: In function 'Get_Server_conn':
src/imapcommon.c:557:16: error: storage size of 'mdctx' isn't known
EVP_MD_CTX mdctx;
^~~~~
make: *** [Makefile:67: src/imapcommon.o] Error 1
make: *** Waiting for unfinished jobs....
src/main.c: In function 'main':
src/main.c:464:10: warning: implicit declaration of function 'RAND_egd'; did you mean 'RAND_add'? [-Wimplicit-function-declaration]
if ( RAND_egd( ( RAND_file_name( f_randfile, sizeof( f_randfile ) ) == f_randfile ) ? f_randfile : "/.rnd" ) )
^~~~~~~~
RAND_add
src/main.c: In function 'SetBannerAndCapability':
src/main.c:1434:11: warning: implicit declaration of function 'Attempt_STARTTLS' [-Wimplicit-function-declaration]
if ( Attempt_STARTTLS( &itd ) != 0 )
^~~~~~~~~~~~~~~~
src/main.c: In function 'verify_callback':
src/main.c:1577:16: error: dereferencing pointer to incomplete type 'X509_STORE_CTX {aka struct x509_store_ctx_st}'
switch (ctx->error) {
^~
src/becomenonroot.c: In function 'BecomeNonRoot':
src/becomenonroot.c:142:170: warning: implicit declaration of function 'strerror'; did you mean 'hstrerror'? [-Wimplicit-function-declaration]
syslog( LOG_WARNING, "%s: chown() failed to set ownership of file '%s' to '%s:%s': %s", fn, PC_Struct.stat_filename, PC_Struct.proc_username, PC_Struct.proc_groupname, strerror( errno ) );
^~~~~~~~
hstrerror
make: *** [Makefile:67: src/main.o] Error 1
src/request.c: In function 'cmd_authenticate_login':
src/request.c:897:5: warning: implicit declaration of function 'ICC_Invalidate'; did you mean 'SCT_validate'? [-Wimplicit-function-declaration]
ICC_Invalidate(Server.conn->ICC);
^~~~~~~~~~~~~~
SCT_validate
Fehler: Fehler-Status beim Beenden von /var/tmp/rpm-tmp.v8yNQu (%build)
Fehler beim Bauen des RPM:
Fehler-Status beim Beenden von /var/tmp/rpm-tmp.v8yNQu (%build)
my spec file:
%global date 20170818
Name: up-imapproxy
Summary: University of Pittsburgh IMAP Proxy
Version: 1.2.8
Release: 1.%{date}.%{?dist}
License: GPLv2+
Group: System Environment/Daemons
URL: http://www.imapproxy.org
Source0: http://www.imapproxy.org/downloads/squirrelmail-%{date}_0200-SVN.imap_proxy.tar.bz2
Source1: imapproxy.service
BuildRequires: openssl-devel tcp_wrappers ncurses-devel tcp_wrappers-devel
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%description
%prep
%setup -q -n squirrelmail.imap_proxy
%build
export CFLAGS="%{optflags} -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack"
export CXXFLAGS="$CFLAGS"
export CC="gcc $CFLAGS"
export LDFLAGS="-Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -pie $CFLAGS"
%configure
make %{?_smp_mflags}
%install
The install-* Makefile targets don't support DESTDIR syntax, so work around.
install -D -m 0644 -p scripts/imapproxy.conf \
%{buildroot}%{_sysconfdir}/imapproxy.conf
install -D -m 0755 -p %{SOURCE1} %{buildroot}%{_unitdir}/imapproxy.service
install -d -m 0755 %{buildroot}%{_sbindir}
install -m 0755 bin/* %{buildroot}%{_sbindir}
install -d -m 0755 %{buildroot}%{_localstatedir}/run
touch %{buildroot}%{_localstatedir}/run/pimpstats
Fix debuginfo package file permission
chmod 644 include/imapproxy.h src/main.c
remove unused Files
rm -rf %{buildroot}/%doc
strip -s --strip-unneeded %{buildroot}%{_sbindir}/*
%post
if [ $1 -eq 1 ] ; then
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%preun
if [ $1 -eq 0 ] ; then
/bin/systemctl --no-reload disable imapproxy.service > /dev/null 2>&1 || :
/bin/systemctl stop imapproxy.service > /dev/null 2>&1 || :
fi
%postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
/bin/systemctl try-restart imapproxy.service >/dev/null 2>&1 || :
fi
%triggerun -- up-imapproxy < 1.2.7-4
/usr/bin/systemd-sysv-convert --save imapproxy >/dev/null 2>&1 ||:
/sbin/chkconfig --del imapproxy >/dev/null 2>&1 || :
/bin/systemctl try-restart imapproxy.service >/dev/null 2>&1 || :
%files
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/imapproxy.conf
%ghost %{_localstatedir}/run/pimpstats
%{_unitdir}/imapproxy.service
%{_sbindir}/*
when i build with this spec file on fedora 25 it works, i think the problem is gcc 7 or a failed patch for openssl 1.1
you need to either build against compat-openssl10-devel (temporary uninstall openssl-devel) or use the recent openssl-1.1 patch from Fedora https://koji.fedoraproject.org/koji/buildinfo?buildID=988103