Bug 161199

Summary: [ERROR] cannot portupgrade ports/comms/libimobiledevice with CLANG
Product: Ports & Packages Reporter: Andrei Lavreniyuk <andy.lavr>
Component: Individual Port(s)Assignee: Alberto Villa <avilla>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Andrei Lavreniyuk 2011-10-01 13:00:21 UTC
# portupgrade -f libimobiledevice-1.0.6_2
--->  Reinstalling 'libimobiledevice-1.0.6_2' (comms/libimobiledevice)
--->  Building '/usr/ports/comms/libimobiledevice'
===>  Cleaning for libimobiledevice-1.0.6_2
===>  Vulnerability check disabled, database not found
===>  License LGPL21 accepted by the user
===>  Extracting for libimobiledevice-1.0.6_2
=> SHA256 Checksum OK for libimobiledevice-1.0.6.tar.bz2.
===>  Patching for libimobiledevice-1.0.6_2
===>   libimobiledevice-1.0.6_2 depends on executable: pkg-config - found
===>   libimobiledevice-1.0.6_2 depends on shared library: gnutls.47 - found
===>   libimobiledevice-1.0.6_2 depends on shared library: tasn1.4 - found
===>   libimobiledevice-1.0.6_2 depends on shared library: gcrypt.18 - found
===>   libimobiledevice-1.0.6_2 depends on shared library: plist.1 - found
===>   libimobiledevice-1.0.6_2 depends on shared library: usbmuxd.1 - found
===>   libimobiledevice-1.0.6_2 depends on shared library: glib-2.0.0 - found
===>  Configuring for libimobiledevice-1.0.6_2
/usr/bin/sed -i.bak -e 's|$(libdir)/pkgconfig|/usr/local/libdata/pkgconfig|g'  /usr/ports/comms/libimobiledevice/work/libimobiledevice-1.0.6/Makefile.in
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... clang
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 clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of clang... gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ accepts -g... yes
checking dependency style of clang++... gcc3
checking whether clang and cc understand -c and -o together... yes
checking build system type... amd64-portbld-freebsd9.0
checking host system type... amd64-portbld-freebsd9.0
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by clang... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... (cached) 262144
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from clang object... ok
checking how to run the C preprocessor... clang -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 dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether clang++ accepts -g... (cached) yes
checking dependency style of clang++... (cached) gcc3
checking how to run the C++ preprocessor... clang++ -E
checking for objdir... .libs
checking if clang supports -fno-rtti -fno-exceptions... yes
checking for clang option to produce PIC... -fPIC -DPIC
checking if clang PIC flag -fPIC -DPIC works... yes
checking if clang static flag -static works... yes
checking if clang supports -c -o file.o... yes
checking if clang supports -c -o file.o... (cached) yes
checking whether the clang linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... freebsd9.0 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ld used by clang++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the clang++ linker (/usr/bin/ld) supports shared libraries... yes
checking for clang++ option to produce PIC... -fPIC -DPIC
checking if clang++ PIC flag -fPIC -DPIC works... yes
checking if clang++ static flag -static works... yes
checking if clang++ supports -c -o file.o... yes
checking if clang++ supports -c -o file.o... (cached) yes
checking whether the clang++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... freebsd9.0 ld.so
checking how to hardcode library paths into programs... immediate
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libusbmuxd... yes
checking for libglib2... yes
checking for libgthread2... yes
checking for libgnutls... yes
checking for libtasn1... yes
checking for libplist... yes
checking for libplistmm... yes
checking for gcry_control in -lgcrypt... yes
checking for ANSI C header files... (cached) yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking gcrypt.h usability... yes
checking gcrypt.h presence... no
configure: WARNING: gcrypt.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: gcrypt.h: proceeding with the compiler's result
checking for gcrypt.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint8_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strerror... yes
checking for strndup... yes
checking for supported compiler flags...  -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for native large file support... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating include/Makefile
config.status: creating dev/Makefile
config.status: creating tools/Makefile
config.status: creating swig/Makefile
config.status: creating docs/Makefile
config.status: creating libimobiledevice-1.0.pc
config.status: creating doxygen.cfg
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Configuration for libimobiledevice 1.0.6:
-------------------------------------------

  Install prefix: .........: /usr/local
  Debug code ..............: no
  Dev tools ...............: no
  Python bindings .........: no

  Now type 'make' to build libimobiledevice 1.0.6,
  and then 'make install' for installation.

===>  Building for libimobiledevice-1.0.6_2
make  all-recursive
Making all in src
CC     idevice.lo
CC     debug.lo
CC     userpref.lo
  CC     property_list_service.lo
idevice.c:587:2: warning: 'gnutls_certificate_client_set_retrieve_function' is deprecated [-Wdeprecated-declarations]
        gnutls_certificate_client_set_retrieve_function (ssl_data_loc->certificate, internal_cert_callback);
        ^
idevice.c:596:3: warning: 'gnutls_cipher_set_priority' is deprecated [-Wdeprecated-declarations]
                gnutls_cipher_set_priority(ssl_data_loc->session, cipher_priority);
                ^
idevice.c:597:3: warning: 'gnutls_compression_set_priority' is deprecated [-Wdeprecated-declarations]
                gnutls_compression_set_priority(ssl_data_loc->session, comp_priority);
                ^
idevice.c:598:3: warning: 'gnutls_kx_set_priority' is deprecated [-Wdeprecated-declarations]
                gnutls_kx_set_priority(ssl_data_loc->session, kx_priority);
                ^
idevice.c:599:3: warning: 'gnutls_protocol_set_priority' is deprecated [-Wdeprecated-declarations]
                gnutls_protocol_set_priority(ssl_data_loc->session, protocol_priority);
                ^
idevice.c:600:3: warning: 'gnutls_mac_set_priority' is deprecated [-Wdeprecated-declarations]
                gnutls_mac_set_priority(ssl_data_loc->session, mac_priority);
                ^
6 warnings generated.
In file included from userpref.c:31:
/usr/local/include/gcrypt.h:1336:3: warning: 'gcry_ac_io_mode_t' is deprecated [-Wdeprecated-declarations]
  gcry_ac_io_mode_t mode _GCRY_ATTR_INTERNAL;
  ^
/usr/local/include/gcrypt.h:1337:3: warning: 'gcry_ac_io_type_t' is deprecated [-Wdeprecated-declarations]
  gcry_ac_io_type_t type _GCRY_ATTR_INTERNAL;
  ^
/usr/local/include/gcrypt.h:1344:2: warning: 'gcry_ac_data_read_cb_t' is deprecated [-Wdeprecated-declarations]
        gcry_ac_data_read_cb_t cb;
        ^
/usr/local/include/gcrypt.h:1358:2: warning: 'gcry_ac_data_write_cb_t' is deprecated [-Wdeprecated-declarations]
        gcry_ac_data_write_cb_t cb;
        ^
/usr/local/include/gcrypt.h:1393:3: warning: 'gcry_md_algo_t' is deprecated [-Wdeprecated-declarations]
  gcry_md_algo_t md;
  ^
/usr/local/include/gcrypt.h:1401:3: warning: 'gcry_md_algo_t' is deprecated [-Wdeprecated-declarations]
  gcry_md_algo_t md;
  ^
  CC     device_link_service.lo
  CC     lockdown.lo
6 warnings generated.
  CC     afc.lo
  CC     file_relay.lo
  CC     notification_proxy.lo
  CC     installation_proxy.lo
  CC     sbservices.lo
  CC     mobile_image_mounter.lo
  CC     screenshotr.lo
  CC     mobilesync.lo
  CC     mobilebackup.lo
  CCLD   libimobiledevice.la
.libs/idevice.o: In function `idevice_event_subscribe':
idevice.c:(.text+0x4a): undefined reference to `debug_info_real'
/usr/bin/ld: .libs/idevice.o: relocation R_X86_64_PC32 against `debug_info_real' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
1 error
*** Error code 1
1 error
*** Error code 2
1 error
*** Error code 1

Stop in /usr/ports/comms/libimobiledevice.
** Command failed [exit code 1]: /usr/bin/script -qa /var/tmp/portupgrade20111001-87043-c522cu env UPGRADE_TOOL=portupgrade UPGRADE_PORT=libimobiledevice-1.0.6_2 UPGRADE_PORT_VER=1.0.6_2 make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! comms/libimobiledevice (libimobiledevice-1.0.6_2)     (linker error)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-10-01 13:00:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->avilla

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Chris Rees freebsd_committer freebsd_triage 2011-10-01 14:26:31 UTC
State Changed
From-To: open->closed

I have explained several times now that there is no point in reporting 
ports that fail to build with clang. It is not expected that every port 
support clang yet, so breakage will occur.  The list of 
broken-with-clang ports is at 
http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp.20110723205754/ 
(some have been fixed). Please stop reporting breakage with clang unless 
you have a fix.