Hi,
I have the following specfile which compiled fine in F29 but is not able to find
references to standard functions in X11, etc even though the compilation happens without
error (outside the rpmbuild environment). So I am wondering if anyone has some suggestions
on what has changed/is going wrong.
Here is the spec file:
$ fpaste thaali.spec
Uploading (1.4KiB)...
https://paste.fedoraproject.org/paste/3sHHnOdGoM4YHmdzzJRzgQ
And here are the messages that I get when I try to build:
$ rpmbuild -bb thaali.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.k76G12
+ umask 022
+ cd /home/maitra/rpmbuild/BUILD
+ cd /home/maitra/rpmbuild/BUILD
+ rm -rf thaali-0.4.2
+ /usr/bin/bzip2 -dc /home/maitra/rpmbuild/SOURCES/thaali-0.4.2.tar.bz2
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd thaali-0.4.2
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.YvXEwJ
+ umask 022
+ cd /home/maitra/rpmbuild/BUILD
+ cd thaali-0.4.2
+ autoreconf -if
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
-I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
-I/usr/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
+ export LDFLAGS
+ '[' 1 = 1 ']'
+++ dirname ./configure
++ find . -name config.guess -o -name config.sub
+ '[' 1 = 1 ']'
+ '[' x '!=' 'x-Wl,-z,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld' ']'
++ find . -name ltmain.sh
+ ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu
--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
--infodir=/usr/share/info
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for x86_64-redhat-linux-gnu-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
+ /usr/bin/make -O -j8
/usr/bin/make all-recursive
Making all in src
make[2]: Entering directory '/home/maitra/rpmbuild/BUILD/thaali-0.4.2/src'
gcc -DHAVE_CONFIG_H -I. -I.. -O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c -o thaali.o
thaali.c
make[2]: Leaving directory '/home/maitra/rpmbuild/BUILD/thaali-0.4.2/src'
make[2]: Entering directory '/home/maitra/rpmbuild/BUILD/thaali-0.4.2/src'
gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z,relro
-Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -lSM -lICE
-lX11 -o thaali thaali.o
/bin/ld: thaali.o: in function `delete_dock':
/home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:231: undefined reference to
`XDestroyWindow'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:232: undefined reference to
`XDestroyWindow'
/bin/ld: thaali.o: in function `create_dock':
/home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:268: undefined reference to
`XCreateSimpleWindow'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:271: undefined reference to
`XCreateSimpleWindow'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:274: undefined reference to
`XAllocClassHint'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:281: undefined reference to
`XSetClassHint'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:282: undefined reference to
`XFree'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:284: undefined reference to
`XAllocWMHints'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:294: undefined reference to
`XSetWMHints'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:295: undefined reference to
`XFree'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:297: undefined reference to
`XSetWindowBackgroundPixmap'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:327: undefined reference to
`XSelectInput'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:328: undefined reference to
`XMapRaised'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:329: undefined reference to
`XFlush'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:301: undefined reference to
`XInternAtom'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:302: undefined reference to
`XSetSelectionOwner'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:304: undefined reference to
`XGetSelectionOwner'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:310: undefined reference to
`XInternAtom'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:319: undefined reference to
`XSendEvent'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:321: undefined reference to
`XInternAtom'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:322: undefined reference to
`XInternAtom'
/bin/ld: thaali.o: in function `add_icon':
/home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:385: undefined reference to
`XReparentWindow'
/bin/ld: thaali.o: in function `add_tray_icon':
/home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:455: undefined reference to
`XSelectInput'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:456: undefined reference to
`XWithdrawWindow'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:460: undefined reference to
`XSync'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:461: undefined reference to
`XMapRaised'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:464: undefined reference to
`XInternAtom'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:471: undefined reference to
`XSendEvent'
/bin/ld: thaali.o: in function `configure_tray_icon_attrib':
/home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:499: undefined reference to
`XGetWindowAttributes'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:516: undefined reference to
`XMoveResizeWindow'
/bin/ld: thaali.o: in function `handle_event':
/home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:530: undefined reference to
`XGetWindowAttributes'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:537: undefined reference to
`XResizeWindow'
/bin/ld: thaali.o: in function `eventLoop':
/home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:566: undefined reference to
`XNextEvent'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:602: undefined reference to
`XGetSelectionOwner'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:603: undefined reference to
`XSetSelectionOwner'
/bin/ld: thaali.o: in function `main':
/home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:620: undefined reference to
`XOpenDisplay'
/bin/ld: /home/maitra/rpmbuild/BUILD/thaali-0.4.2/src/thaali.c:631: undefined reference to
`XCloseDisplay'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:335: thaali] Error 1
make[2]: Leaving directory '/home/maitra/rpmbuild/BUILD/thaali-0.4.2/src'
make[1]: *** [Makefile:357: all-recursive] Error 1
make: *** [Makefile:298: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.YvXEwJ (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.YvXEwJ (%build)
What is going wrong?
Many thanks and best wishes,
Ranjan