#280 ✓invalid
sshah

libimobiledevice 1.1.4 unable to link on Mac OS

Reported by sshah | August 24th, 2012 @ 05:07 AM | in 1.2.0 Release

Mac OS: 10.7.4

I get following linking errors when try to build libimobiledevice 1.1.4 on Mac OS (through fink).

Configuration for libimobiledevice 1.1.4:

Install prefix: .........: /sw Debug code ..............: no Dev tools ...............: no Python bindings .........: no SSL support .............: OpenSSL

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

make
make all-recursive
Making all in src
CC idevice.lo CC debug.lo CC userpref.lo CC property_list_service.lo CC device_link_service.lo CC lockdown.lo 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 CC house_arrest.lo CC mobilebackup2.lo CC restore.lo CCLD libimobiledevice.la Undefined symbols for architecture x86_64:
"_debug_buffer", referenced from:

  _afc_dispatch_packet in afc.o
  _afc_receive_data in afc.o
  _afc_file_lock in afc.o

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: [libimobiledevice.la] Error 1
make[1]:
[all-recursive] Error 1
make: *** [all] Error 2

execution of make failed, exit code 2

execution of /tmp/fink.TD8v8 failed, exit code 2


making following changes to debug.h allows successful link,
replace
LIBIMOBILEDEVICE_INTERNAL inline void debug_buffer(const char data, const int length);
by
inline void debug_buffer(const char
data, const int length);

Comments and changes to this ticket

  • viewrain

    viewrain September 13th, 2012 @ 11:54 AM

    • Assigned user set to “Martin S.”

    I encountered the same problem when installed libimobiledevice 1.1.4 via fink.

    Would you please take a look at it?

    Thanks.

  • mischi

    mischi September 13th, 2012 @ 01:50 PM

    Hi sshah, viewrain.

    I am maintaining the fink packages and added a patch along your suggestion. However, I do not have 10.7. Can you test and report back?

    Michael Schindler

  • viewrain

    viewrain September 16th, 2012 @ 02:25 PM

    Thanks, mischi:

    I've already run "fink selfupdate" and tried to reinstall libimobiledevice.
    There's still the same error:
    make
    make all-recursive
    Making all in src
    CC idevice.lo CC debug.lo CC userpref.lo CC property_list_service.lo CC device_link_service.lo CC lockdown.lo 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 CC house_arrest.lo CC mobilebackup2.lo CC restore.lo CCLD libimobiledevice.la Undefined symbols for architecture x86_64:
    "_debug_buffer", referenced from:

      _afc_dispatch_packet in afc.o
      _afc_receive_data in afc.o
      _afc_file_lock in afc.o
    

    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: [libimobiledevice.la] Error 1
    make[1]:
    [all-recursive] Error 1
    make: *** [all] Error 2

    execution of make failed, exit code 2

    execution of /tmp/fink.3VJUQ failed, exit code 2

    Removing runtime build-lock...
    Removing build-lock package...
    /sw/bin/dpkg-lockwait -r fink-buildlock-libimobiledevice-1.1.4-6 (Reading database ... 26459 files and directories currently installed.) Removing fink-buildlock-libimobiledevice-1.1.4-6 ...
    Failed: phase compiling: libimobiledevice-1.1.4-6 failed

    Before reporting any errors, please run "fink selfupdate" and try again.

    If you continue to have issues, please check to see if the FAQ on Fink's
    website solves the problem. If not, ask on one (not both, please) of
    these mailing lists:

    The Fink Users List <fink-users@lists.sourceforge.net>
    The Fink Beginners List <fink-beginners@lists.sourceforge.net>,
    

    with a carbon copy to the maintainer:

    Karl-Michael Schindler <karl-michael.schindler@web.de>
    

    Note that this is preferable to emailing just the maintainer directly,
    since most fink package maintainers do not have access to all possible
    hardware and software configurations.

    Please try to include the complete error message in your report. This
    generally consists of a compiler line starting with e.g. "gcc" or "g++"
    followed by the actual error output from the compiler.

    Also include the following system information:
    Package manager version: 0.34.3
    Distribution version: selfupdate-rsync Thu Sep 13 19:42:59 2012, 10.7, x86_64
    Trees: local/main stable/main
    Xcode.app: 4.4
    Xcode command-line tools: 4.3.0.0.1.1249367152
    Max. Fink build jobs: 1

  • mischi

    mischi September 16th, 2012 @ 03:15 PM

    Hi ViewRain

    Somehow, the selfupdate was not really successful, since it still tried to build revision 6 of version 1.1.4. However, the bugfix is included in revision 7. I am not sure, what the actual problem is, maybe revision 6 was kept due to some dependencies.

    I would try another "fink selfupdate" as well as "fink --recursive remove libimobiledevice, libimobiledevice4-shlibs". Then try a "fink rebuild libimobiledevice libimobiledevice4-shlibs" and check whether it really starts to build libimobiledevice-1.1.4-7. Then you can do a "fink install libimobiledevice".

    MiSchi

  • mischi

    mischi September 16th, 2012 @ 03:18 PM

    oops, wrong comma in that command. Again the whole sequence of commands with addition of the -dev package:

    fink selfupdate

    fink --recursive remove libimobiledevice libimobiledevice4-shlibs libimobiledevice4-dev

    fink rebuild libimobiledevice4-shlibs

    fink install libimobiledevice libimobiledevice4-shlibs libimobiledevice4-dev

  • viewrain

    viewrain September 16th, 2012 @ 03:30 PM

    Thanks for your quick reply.

    It seems that fink doesn't recognize "--recursive" as an option, see the output:
    Unknown option: recursive
    fink: unknown option
    Type 'fink --help' for more information.

    I tried to remove the binaries without "--recursive", and rebuilt libimobiledevice4-shlibs. Still the same error.

  • mischi

    mischi September 16th, 2012 @ 03:33 PM

    Can we meet on irc? either the channel #fink or the channel #libimobiledevice, both on irc.freenode.net.

  • mischi

    mischi September 16th, 2012 @ 04:06 PM

    Oh, my bad. screwed up the order in the command. This is the corrected one:

    fink remove --recursive libimobiledevice libimobiledevice4-shlibs libimobiledevice4-dev

  • iconstate

    iconstate September 16th, 2012 @ 10:10 PM

    I did the following on 10.8.1 and it failed.

    fink selfupdate
    fink remove --recursive libimobiledevice libimobiledevice4-shlibs libimobiledevice4-dev
    fink rebuild libimobiledevice4-shlibs

    $ fink remove --recursive libimobiledevice libimobiledevice4-shlibs libimobiledevice4-dev
    Information about 6070 packages read in 1 seconds.
    WARNING: libimobiledevice is not installed, skipping.
    WARNING: libimobiledevice4-dev is not installed, skipping.
    WARNING: libimobiledevice4-shlibs is not installed, skipping.
    Nothing remove --recursived
    
    $ fink rebuild libimobiledevice4-shlibs
    Information about 6070 packages read in 1 seconds.
    The following package will be rebuilt:
     libimobiledevice4-shlibs
    Setting runtime build-lock...
    dpkg-deb -b /sw/src/fink.build/root-fink-buildlock-libimobiledevice-1.1.4-7 /sw/src/fink.build
    dpkg-deb: building package `fink-buildlock-libimobiledevice-1.1.4-7' in `/sw/src/fink.build/fink-buildlock-libimobiledevice-1.1.4-7_2012.09.16-18.06.45_darwin-x86_64.deb'.
    Installing build-lock package...
    /sw/bin/dpkg-lockwait -i /sw/src/fink.build/fink-buildlock-libimobiledevice-1.1.4-7_2012.09.16-18.06.45_darwin-x86_64.deb
    Selecting previously deselected package fink-buildlock-libimobiledevice-1.1.4-7.
    (Reading database ... 26808 files and directories currently installed.)
    Unpacking fink-buildlock-libimobiledevice-1.1.4-7 (from .../fink-buildlock-libimobiledevice-1.1.4-7_2012.09.16-18.06.45_darwin-x86_64.deb) ...
    Setting up fink-buildlock-libimobiledevice-1.1.4-7 (2012.09.16-18.06.45) ...
    
    sudo -u fink-bld [ENV] sh -c /tmp/fink.q3Q_m
    /sw/bin/tar  --no-same-owner --no-same-permissions -xf /sw/src/libimobiledevice-1.1.4.tar.bz2
    sudo -u fink-bld [ENV] sh -c /tmp/fink.nvS3_
    sed -i.bak 's|LIBIMOBILEDEVICE_INTERNAL inline void debug_buffer(|inline void debug_buffer(|g' src/debug.h
    sudo -u fink-bld [ENV] sh -c /tmp/fink.Lkugo
    ./configure --prefix=/sw LDFLAGS="-L/sw/lib" --without-cython
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... ./install-sh -c -d
    checking for gawk... no
    checking for mawk... no
    
    ...
    
    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 cython/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.1.4:
    -------------------------------------------
    
      Install prefix: .........: /sw
      Debug code ..............: no
      Dev tools ...............: no
      Python bindings .........: no
      SSL support .............: OpenSSL
    
      Now type 'make' to build libimobiledevice 1.1.4,
      and then 'make install' for installation.
    
    make
    make  all-recursive
    Making all in src
      CC     idevice.lo
      CC     debug.lo
      CC     userpref.lo
      CC     property_list_service.lo
      CC     device_link_service.lo
      CC     lockdown.lo
      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
      CC     house_arrest.lo
      CC     mobilebackup2.lo
      CC     restore.lo
      CCLD   libimobiledevice.la
    Undefined symbols for architecture x86_64:
      "_debug_buffer", referenced from:
          _afc_dispatch_packet in afc.o
          _afc_receive_data in afc.o
          _afc_file_lock in afc.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [libimobiledevice.la] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2
    ### execution of make failed, exit code 2
    ### execution of /tmp/fink.Lkugo failed, exit code 2
    Removing runtime build-lock...
    Removing build-lock package...
    /sw/bin/dpkg-lockwait -r fink-buildlock-libimobiledevice-1.1.4-7
    (Reading database ... 26809 files and directories currently installed.)
    Removing fink-buildlock-libimobiledevice-1.1.4-7 ...
    Failed: phase compiling: libimobiledevice-1.1.4-7 failed
    
    Before reporting any errors, please run "fink selfupdate" and try again.
    
    If you continue to have issues, please check to see if the FAQ on Fink's 
    website solves the problem.  If not, ask on one (not both, please) of
    these mailing lists:
    
        The Fink Users List <fink-users@lists.sourceforge.net>
        The Fink Beginners List <fink-beginners@lists.sourceforge.net>,
    
    with a carbon copy to the maintainer:
    
        Karl-Michael Schindler <karl-michael.schindler@web.de>
    
    Note that this is preferable to emailing just the maintainer directly,
    since most fink package maintainers do not have access to all possible
    hardware and software configurations.
    
    Please try to include the complete error message in your report.  This
    generally consists of a compiler line starting with e.g. "gcc" or "g++"
    followed by the actual error output from the compiler.
    
    Also include the following system information:
    Package manager version: 0.34.3
    Distribution version: selfupdate-rsync Sun Sep 16 17:53:23 2012, 10.8, x86_64
    Trees: local/main stable/main
    Xcode.app: 4.5
    Xcode command-line tools: 4.5.0.0.1.1249367152
    Max. Fink build jobs:  1
    
  • mischi

    mischi September 16th, 2012 @ 10:38 PM

    I had a look at afc.c, afc.h, debug.c and debug.h, but do not understand, where the problem comes from. My knowledge of C is too limited to fix this. Sorry. I can't do more than applying known patches to the fink package.

    MiSchi

  • Martin S.

    Martin S. October 21st, 2012 @ 03:29 PM

    • State changed from “new” to “open”
    • Tag set to build, clang, compiler, fink, gcc, llvm

    The problem is most likely because you are compiling with LLVM/clang and not with GCC.
    Due to that the internal/attribute directive is interpreted differently which probably causes the symbols to get hidden completely from other modules leading to this error finally.

    Need to repeat this on a Mac soon to make sure for a fix...

  • Martin S.

    Martin S. February 12th, 2013 @ 01:59 PM

    • Milestone set to 1.2.0 Release

    Assigning next milestone.

  • Martin S.

    Martin S. March 19th, 2013 @ 05:01 PM

    • State changed from “open” to “invalid”

    After having my VM setup fink for half a day I noticed that libimobiledevice builds and installs just fine...
    Even using clang manually to compile libimobiledevice worked fine.
    Thus I can't reproduce your issue.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A project around supporting the iPhone in Linux.

See http://libimobiledevice.org

People watching this ticket

Attachments

Pages