ports/176485: x11/xsel-conrad build error with clang

Mike Carlson mike at bayphoto.com
Wed Feb 27 19:20:01 UTC 2013


>Number:         176485
>Category:       ports
>Synopsis:       x11/xsel-conrad build error with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 27 19:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Mike Carlson
>Release:        9.1-RELEASE
>Organization:
Bay Photo Lab
>Environment:
FreeBSD pkg-server 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
port x11/xsel-conrad fails to build with clang:

# make
===>  License xsel-conrad accepted by the user
===>   xsel-conrad-1.2.0 depends on file: /usr/local/sbin/pkg - found
===>  Extracting for xsel-conrad-1.2.0
=> SHA256 Checksum OK for xsel-1.2.0.tar.gz.
===>  Patching for xsel-conrad-1.2.0
===>   xsel-conrad-1.2.0 depends on file: /usr/local/libdata/pkgconfig/x11.pc - found
===>   xsel-conrad-1.2.0 depends on file: /usr/local/libdata/pkgconfig/xext.pc - found
===>   xsel-conrad-1.2.0 depends on file: /usr/local/libdata/pkgconfig/xt.pc - found
===>   xsel-conrad-1.2.0 depends on file: /usr/local/libdata/pkgconfig/xproto.pc - found
===>   xsel-conrad-1.2.0 depends on file: /usr/local/libdata/pkgconfig/ice.pc - found
===>   xsel-conrad-1.2.0 depends on file: /usr/local/libdata/pkgconfig/sm.pc - found
===>  Configuring for xsel-conrad-1.2.0
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... clang
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 clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking dependency style of clang... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) clang
checking whether we are using the GNU C compiler... (cached) yes
checking whether clang accepts -g... (cached) yes
checking for clang option to accept ISO C89... (cached) none needed
checking dependency style of clang... (cached) gcc3
checking how to run the C preprocessor... clang-cpp
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether make sets $(MAKE)... (cached) yes
checking for X... libraries /usr/local/lib, headers /usr/local/include
checking whether -R must be followed by a space... neither works
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for XOpenDisplay in -lX11... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/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 errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... no
checking for pid_t... yes
checking for size_t... yes
checking for struct stat.st_blksize... yes
checking whether time.h and sys/time.h may both be included... yes
checking for uid_t in sys/types.h... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... no
checking for working fork... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking return type of signal handlers... void
checking for dup2... yes
checking for select... yes
checking for strdup... no
checking for strerror... no
checking for strtol... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
===>  Building for xsel-conrad-1.2.0
make  all-am
if clang -DHAVE_CONFIG_H -I. -I. -I.     -O2 -pipe -I/usr/local/include -fno-strict-aliasing -O2 -pipe -I/usr/local/include -fno-strict-aliasing -fno-strict-aliasing -Wall -Werror -g -std=gnu99 -Wdeclaration-after-statement -Wno-unused -MT xsel.o -MD -MP -MF ".deps/xsel.Tpo" -c -o xsel.o xsel.c;  then mv -f ".deps/xsel.Tpo" ".deps/xsel.Po"; else rm -f ".deps/xsel.Tpo"; exit 1; fi
clang -O2 -pipe -I/usr/local/include -fno-strict-aliasing -O2 -pipe -I/usr/local/include -fno-strict-aliasing -fno-strict-aliasing -Wall -Werror -g -std=gnu99 -Wdeclaration-after-statement -Wno-unused  -L/usr/local/lib -lXext -lX11 -o xsel  xsel.o -L/usr/local/lib -lXext -lX11 -lX11
clang: error: argument unused during compilation: '-g'
*** [xsel] Error code 1

Stop in /usr/ports/x11/xsel-conrad/work/xsel-1.2.0.
*** [all] Error code 1

Stop in /usr/ports/x11/xsel-conrad/work/xsel-1.2.0.
*** [do-build] Error code 1

Stop in /usr/ports/x11/xsel-conrad.

>How-To-Repeat:
on a FreeBSD 9.1 RELEASE system, update to ports:

# portsnap fetch extract

# cd /usr/ports/x11/xsel-conrad

# make
>Fix:
I'm not sure how to remove the -g options, but if I manually run the same command with out it, it builds properly:

# cd /usr/ports/x11/xsel-conrad/work/xsel-1.2.0
# clang -O2 -pipe -I/usr/local/include -fno-strict-aliasing -O2 -pipe -I/usr/local/include -fno-strict-aliasing -fno-strict-aliasing -Wall -Werror -std=gnu99 -Wdeclaration-after-statement -Wno-unused -L/usr/local/lib -lXext -lX11 -o xsel xsel.o -L/usr/local/lib -lXext -lX11 -lX11
# pwd
/usr/ports/x11/xsel-conrad/work/xsel-1.2.0

# cd ../..
# ls
Makefile	distinfo	pkg-descr	work
# make
===>  Building for xsel-conrad-1.2.0
make  all-am
# make install
===>  Installing for xsel-conrad-1.2.0
===>   xsel-conrad-1.2.0 depends on file: /usr/local/libdata/pkgconfig/x11.pc - found
===>   xsel-conrad-1.2.0 depends on file: /usr/local/libdata/pkgconfig/xext.pc - found
===>   xsel-conrad-1.2.0 depends on file: /usr/local/libdata/pkgconfig/xt.pc - found
===>   xsel-conrad-1.2.0 depends on file: /usr/local/libdata/pkgconfig/xproto.pc - found
===>   xsel-conrad-1.2.0 depends on file: /usr/local/libdata/pkgconfig/ice.pc - found
===>   xsel-conrad-1.2.0 depends on file: /usr/local/libdata/pkgconfig/sm.pc - found
===>   Generating temporary packing list
===>  Checking if x11/xsel-conrad already installed
===>   Compressing manual pages for xsel-conrad-1.2.0
===>   Registering installation for xsel-conrad-1.2.0
Installing xsel-conrad-1.2.0... done


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list