Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have run this in a terminal.

git clone git://libmtp.git.sourceforge.net/gitroot/libmtp/libmtp
cd libmtp
./autogen.sh

(answering yes to all questions)

But when I try to run the ./configure --prefix=/usr/ I get this error:

checking whether to build static libraries... yes

./configure: line 11739: AC_LIB_PREPARE_PREFIX: command not found

./configure: line 11740: AC_LIB_RPATH: command not found

./configure: line 11745: syntax error near unexpected token `iconv'

./configure: line 11745: `      AC_LIB_LINKFLAGS_BODY(iconv)'

I have built and installed the libiconv from here.

I do not know what to do, been trying for a few hours but I am pretty noob to Linux.

How can i fix this?

The lines 11739 to 11745 in the configure file looks like this:

AC_LIB_PREPARE_PREFIX
AC_LIB_RPATH
AC_LIB_LINKFLAGS_BODY(iconv)
share|improve this question

4 Answers 4

I ended up getting the tarball from here http://sourceforge.net/projects/libmtp/files/libmtp/1.1.4/libmtp-1.1.4.tar.gz/download

then the package compiled without hassle.

had both iconv and gettext installed as detailed on GNU site.

share|improve this answer

Hm... seems like there is a problem with the iconv installation. Could you take a look at this document and search for "iconv.m4"? There is a little section on how to use it with autotools.

Also, did you make sure that gettext is installed? (it should be)

sudo apt-get install gettext

otherwise.

share|improve this answer

Okay, I struggled with this for a few hours so I thought I'd share what I did to get the git install of libmtp to build.

The secret is to be sure to follow all of the instructions on the GNU libiconv page:

http://www.gnu.org/software/libiconv/

Specifically:

first libiconv, then gettext, then libiconv again,

This got the configure script for libmtp to run, but it didn't find iconv to be usable. Thus during make you would get something like:

libmtp.c: In function 'LIBMTP_Open_Raw_Device_Uncached':
libmtp.c:1854:17: error: 'PTPParams' has no member named 'cd_locale_to_ucs2'
libmtp.c:1854:3: warning: implicit declaration of function 'iconv_open' [-Wimplicit-> function-declaration]

To fix that:

$ export LD_PRELOAD=/usr/local/lib/preloadable_libiconv.so

Then it built just fine.

share|improve this answer
apt-get install gettext
./autogen.sh # this is the critical bit
./configure
make
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.