Autogen and Configure Error - libtool

743 views
Skip to first unread message

Nathan Royce

unread,
Apr 1, 2014, 7:50:15 PM4/1/14
to us...@subversion.apache.org
"configure: error: cannot run /bin/sh build/config.sub"
Steps:
First Attempt:
$ svn co http://svn.apache.org/repos/asf/subversion/trunk subversion
$ ./autogen.sh
buildcheck: checking installation...
buildcheck: autoconf version 2.69.117-1717 (ok)
buildcheck: autoheader version 2.69.117-1717 (ok)
buildcheck: libtool version 2.4.2.444.28 (ok)
Copying libtool helper: /cross-tools/share/aclocal/libtool.m4
Copying libtool helper: /cross-tools/share/aclocal/ltoptions.m4
Copying libtool helper: /cross-tools/share/aclocal/ltsugar.m4
Copying libtool helper: /cross-tools/share/aclocal/ltversion.m4
Copying libtool helper: /cross-tools/share/aclocal/lt~obsolete.m4
./autogen.sh: 1: cd: can't cd to /cross-tools/bin/../share/libtool/config
/home/user/Desktop/subversion/config.guess not found (try setting the LIBTOOL_CONFIG environment variable)

Second Attempt:
$ LIBTOOL_CONFIG=/cross-tools/bin/libtool ./autogen.sh
$ ./configure
configure: Configuring Subversion 1.9.0
configure: creating config.nice
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 enable C11 features... -std=gnu11
checking if gcc -std=gnu11 accepts -std=c90... yes
checking if gcc -std=gnu11 accepts -w... yes
checking if gcc -std=gnu11 accepts -Werror=unknown-warning-option... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... -std=gnu++11
checking if g++ -std=gnu++11 accepts -std=c++98... yes
checking if g++ -std=gnu++11 accepts -w... yes
checking if g++ -std=gnu++11 accepts -Werror=unknown-warning-option... no
checking how to run the C preprocessor... gcc -std=gnu11 -E
checking for a sed that does not truncate output... /bin/sed
configure: error: cannot run /bin/sh build/config.sub

"configure:5076: error: cannot run /bin/sh build/config.sub"

"# Grab target_cpu, so we can use it in the Solaris pkginfo file
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5"

$ /bin/bash ./build/config.sub sun4
Usage: /home/user/Desktop/subversion/build/config.sub [OPTION]... [MODE-ARG]...
Try 'config.sub --help' for more information.
config.sub:   error: you must specify a MODE

It's odd because the same compiling method's worked with other programs like Cloog.


Philip Martin

unread,
Apr 2, 2014, 5:41:35 AM4/2/14
to Nathan Royce, us...@subversion.apache.org
Nathan Royce <nar...@hotmail.com> writes:

> "configure: error: cannot run /bin/sh build/config.sub"Steps:First Attempt:$ svn co http://svn.apache.org/repos/asf/subversion/trunk subversion$ ./autogen.shbuildcheck: checking installation...buildcheck: autoconf version 2.69.117-1717 (ok)buildcheck: autoheader version 2.69.117-1717 (ok)buildcheck: libtool version 2.4.2.444.28 (ok)Copying libtool helper: /cross-tools/share/aclocal/libtool.m4Copying libtool helper: /cross-tools/share/aclocal/ltoptions.m4Copying libtool helper: /cross-tools/share/aclocal/ltsugar.m4Copying libtool helper: /cross-tools/share/aclocal/ltversion.m4Copying libtool helper: /cross-tools/share/aclocal/lt~obsolete.m4./autogen.sh: 1: cd: can't cd to /cross-tools/bin/../share/libtool/config/home/user/Desktop/subversion/config.guess not found (try setting the LIBTOOL_CONFIG environment variable)
> Second Attempt:$ LIBTOOL_CONFIG=/cross-tools/bin/libtool ./autogen.sh$ ./configureconfigure: Configuring Subversion 1.9.0configure: creating config.nicechecking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables... checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to enable C11 features... -std=gnu11checking if gcc -std=gnu11 accepts -std=c90... yeschecking if gcc -std=gnu11 accepts -w... yeschecking if gcc -std=gnu11 accepts -Werror=unknown-warning-option... nochecking for g++... g++checking whether we are using the GNU C++ compiler... yeschecking whether g++ accepts -g... yeschecking for g++ option to enable C++11 features... -std=gnu++11checking if g++ -std=gnu++11 accepts -std=c++98... yeschecking if g++ -std=gnu++11 accepts -w... yeschecking if g++ -std=gnu++11 accepts -Werror=unknown-warning-option... nochecking how to run the C preprocessor... gcc -std=gnu11 -Echecking for a sed that does not truncate output... /bin/sedconfigure: error: cannot run /bin/sh build/config.sub
> "configure:5076: error: cannot run /bin/sh build/config.sub"
> "# Grab target_cpu, so we can use it in the Solaris pkginfo file# Make sure we can run config.sub.$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5"
> $ /bin/bash ./build/config.sub sun4Usage: /home/user/Desktop/subversion/build/config.sub [OPTION]... [MODE-ARG]...Try 'config.sub --help' for more information.config.sub: error: you must specify a MODE
> It's odd because the same compiling method's worked with other programs like Cloog.

Your mail program appears to be joining the individual lines making it
very hard to read :-(

You don't say what platform you are using, what shell you are using, or
which version of Subversion you are trying to build. I do see 1.9.0,
are you trying to build the 1.9.0-alpha2 tarball? In that case you
should not run ./autogen.sh, you should go straight to ./configure.

You are using /cross-tools/bin/libtool but I also see configure
reporting "cross compiling... no". Are you attempting to cross-compile
Subversion?

--
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Nathan

unread,
Apr 3, 2014, 4:10:56 PM4/3/14
to Philip Martin, us...@subversion.apache.org
Catchup, since replies hadn't been making it to the lists:


On Thu, Apr 3, 2014 at 4:24 AM, Philip Martin <philip...@wandisco.com> wrote:
Nathan <nar...@hotmail.com> writes:

> Sorry, do I CC "us...@subversion.apache.org"? I don't know how to keep it
> on the list specified.

There is no Cc: in the mails you are sending to me.  They are not
showing up on the list:

http://svn.haxx.se/users/archive-2014-04/


--
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

On Wed, Apr 2, 2014 at 9:09 PM, Nathan <nar...@hotmail.com> wrote:
Sorry, do I CC "us...@subversion.apache.org"? I don't know how to keep it on the list specified.
I am not cross-compiling subversion. It is only being compiled for the build/host/target machine:
*****
$ leafpad configure.ac
    remove "AC_PROG_LIBTOOL"
$ LIBTOOL_CONFIG=/cross-tools/bin/libtoolize ./autogen.sh
$ ./configure --prefix=/cross-tools CFLAGS="${buildCFLAGS}" CXXFLAGS="${buildCXXFLAGS}" LDFLAGS="${buildLDFLAGS}" CPPFLAGS="${buildCPPFLAGS}"
  //cannot run /bin/sh build/config.sub
$ make > make.log 2>&1
$ make install > install.log 2>&1
*****
Note, I also tried configure without any parameters.

My setup:
VM snapshots
1 build-essential
 2   fastboot (android)

     mkimage (u-boot)

     gnome-partition-editor (gparted)

     gnome-search-tool

3       automake

        gettext

I'm in the 3rd snapshot which is a culmination of all previous snapshots.

I've built:

BC 1.06.95

linux1 3.14 (cross compile headers that is irrelevent to this part of the process)

Automake 2.69.117-1717

Help2man 1.43.3

Autoconf 2.69.117-1717

libtool 2.4.2.444.28-053d-dirty

Xz 5.1.3alpha

zlib 1.2.8

ncurses1 5.9

texinfo 5.2.5381

pkg-config1  0.28

libffi 6.0.1?

glib 2.0.3992?

pkg-config2 0.28

cpython 2.7.3

perl 5.14.2

flex 2.5.37

bison 3.0.2.11-8044

gperf 3.1

gettext 0.18.3

m4 1.9a.643-c09a1-dirty

gawk 4.1.60

file1 5.18

curl 7.37.0-DEV

libgpg-error 0.10.0?

libgcrypt 20.0.0?

libxml2 2.9.1

apr 2.0.0.0 (assuming apr-util was included)

tcl 8.6.1

sqlite 

 subversion 1.9.0

This is just the part of the list I go through in that order before trying to build subversion and all before creating the actual cross-compile tools and binaries.

Also using gcc 4.7.2-5


On Wed, Apr 2, 2014 at 6:20 PM, Philip Martin <philip...@wandisco.com> wrote:
[Please keep this on the us...@sa.a.o list.]

It's still not clear to me whether you are trying to cross-compile or
not.  Is the failing configure an attempt at a cross-compile?

I'm not sure anyone has ever cross-compiled Subversion before.  Have you
already cross-compiled all the Subversion dependencies such as apr,
apr-util, zlib, serf, etc.?


--
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

On Wed, Apr 2, 2014 at 3:17 PM, Nathan <nar...@hotmail.com> wrote:
Oh wow Philip, that is bad. I was using outlook.com in Chrome on Windows and after seeing your reply, I looked at the Sent Messages and it was the same as when I copied and pasted from the command prompt in Debian in a VM.
I now copied and pasted from Sent Items into Notepad++, changing the EOL from UNIX to Dos. I can only guess that maybe LF was never sent, only CR.
Pasted:
*****
"configure: error: cannot run /bin/sh build/config.sub"
Steps:
First Attempt:
$ ./autogen.sh
buildcheck: checking installation...
buildcheck: autoconf version 2.69.117-1717 (ok)
buildcheck: autoheader version 2.69.117-1717 (ok)
buildcheck: libtool version 2.4.2.444.28 (ok)
Copying libtool helper: /cross-tools/share/aclocal/libtool.m4
Copying libtool helper: /cross-tools/share/aclocal/ltoptions.m4
Copying libtool helper: /cross-tools/share/aclocal/ltsugar.m4
Copying libtool helper: /cross-tools/share/aclocal/ltversion.m4
Copying libtool helper: /cross-tools/share/aclocal/lt~obsolete.m4
./autogen.sh: 1: cd: can't cd to /cross-tools/bin/../share/libtool/config
/home/user/Desktop/subversion/config.guess not found (try setting the LIBTOOL_CONFIG environment variable)

Second Attempt:
$ LIBTOOL_CONFIG=/cross-tools/bin/libtool ./autogen.sh
$ ./configure
configure: Configuring Subversion 1.9.0
configure: creating config.nice
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 enable C11 features... -std=gnu11
checking if gcc -std=gnu11 accepts -std=c90... yes
checking if gcc -std=gnu11 accepts -w... yes
checking if gcc -std=gnu11 accepts -Werror=unknown-warning-option... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... -std=gnu++11
checking if g++ -std=gnu++11 accepts -std=c++98... yes
checking if g++ -std=gnu++11 accepts -w... yes
checking if g++ -std=gnu++11 accepts -Werror=unknown-warning-option... no
checking how to run the C preprocessor... gcc -std=gnu11 -E
checking for a sed that does not truncate output... /bin/sed
configure: error: cannot run /bin/sh build/config.sub

"configure:5076: error: cannot run /bin/sh build/config.sub"

"# Grab target_cpu, so we can use it in the Solaris pkginfo file
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5"

$ /bin/bash ./build/config.sub sun4
Usage: /home/user/Desktop/subversion/build/config.sub [OPTION]... [MODE-ARG]...
Try 'config.sub --help' for more information.
config.sub:   error: you must specify a MODE

It's odd because the same compiling method's worked with other programs like Cloog.
*****
Platform: Linux debian72X8664 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux
Shell: /bin/sh -> dash
  *****
  dir
  1580249

   2014-03-21T11:03:30.679527Z
   1579922
   philip
   has-props
   *****

I will be cross-compiling. I compiled all of the tools and got to Check (also gitted) which was looking for subversion. That is when I opened a new command prompt, set the PATH to include the missing binaries I compiled into tools (not cross compiled), tried building subversion and get that error.
I tried going through my notes I took along the way and went by scratch and when I encountered issues with binutils-gdb and then glibc (all gitted), I adjusted by "git checkout binutils-2_24-branch" and "git checkout glibc-2.19".
Once I do get the target environment functional, I will natively build everything else.

Philip Martin

unread,
Apr 3, 2014, 5:57:45 PM4/3/14
to Nathan, us...@subversion.apache.org
Nathan <nar...@hotmail.com> writes:

>> checking for g++ option to enable C++11 features... -std=gnu++11
>> checking if g++ -std=gnu++11 accepts -std=c++98... yes
>> checking if g++ -std=gnu++11 accepts -w... yes
>> checking if g++ -std=gnu++11 accepts -Werror=unknown-warning-option... no
>> checking how to run the C preprocessor... gcc -std=gnu11 -E
>> checking for a sed that does not truncate output... /bin/sed
>> configure: error: cannot run /bin/sh build/config.sub
>>
>> "configure:5076: error: cannot run /bin/sh build/config.sub"
>>
>> "# Grab target_cpu, so we can use it in the Solaris pkginfo file
>> # Make sure we can run config.sub.
>> $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
>> as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5"
>>
>> $ /bin/bash ./build/config.sub sun4
>> Usage: /home/user/Desktop/subversion/build/config.sub [OPTION]...
>> [MODE-ARG]...
>> Try 'config.sub --help' for more information.
>> config.sub: error: you must specify a MODE

On my machine

$ ../src/build/config.sub sun4
sparc-sun-sunos4.1.1

My config.sub does not contain the string "MODE" and so cannot produce
the output you show. I'm using config.sub from Debian's autotools-dev
20120608.1

I associate MODE-ARG with libtool and that error looks like the error
libtool produces. Have you managed to get libtool and config.sub mixed
up?

Nathan

unread,
Apr 3, 2014, 6:31:29 PM4/3/14
to Philip Martin, us...@subversion.apache.org
So, I looked into autotools since you mentioned it, and see that it is autoconf, automake, libtool and gettext in a dist package (https://www.lrde.epita.fr/~adl/autotools.html)
I had compiled the latest of each of those and my understanding is that libtool creates "config.sub". Actually, just doing a quick search in my build-dir, config.sub exists under both share/automake and share/libtool.

When I got tried ./autogen.sh and got "./autogen.sh: 1: cd: can't cd to /cross-tools/bin/../share/libtool/config", that made me think libtool was the problem. And when it was followed by ".../subversion/config.guess not found (try setting the LIBTOOL_CONFIG environment variable)", that had me instead try "LIBTOOL_CONFIG=/cross-tools/bin/libtoolize ./autogen.sh" which caused the "config.sub"-mode problem.

When it said it couldn't cd to that config, I thought that was odd and looked at the install.log I had "make" write to:
 /usr/bin/install -c './build-aux/config.guess' '/cross-tools/share/libtool/build-aux/config.guess'
 /usr/bin/install -c './build-aux/config.sub' '/cross-tools/share/libtool/build-aux/config.sub'

The config stuff is under build-aux. But none of that matters if it's using the one from libtool which is looking for "mode" as opposed to share/automake1.99a/config.sub which does not.

(this time, I now am noticing the reply will now go to you and the list. I can only guess that I never chose reply-to-all before).
Reply all
Reply to author
Forward
0 new messages