./configure fails on freebsd

102 views
Skip to first unread message

Dima Pasechnik

unread,
Mar 22, 2017, 12:07:42 PM3/22/17
to sage-devel
running ./configure after
./bootstrap fails with

checking build system type... Invalid configuration `x': machine `x' not recognized
configure: error: bash config/config.sub x failed

Any idea how to proceed?

$ uname -a
FreeBSD dimpase-bsd.cs.ox.ac.uk 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016     ro...@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

Dima Pasechnik

unread,
Mar 23, 2017, 11:23:27 AM3/23/17
to sage-devel

I get through to 


checking build system type... amd64-unknown-freebsd11.0

checking host system type... amd64-unknown-freebsd11.0

configure: error: 

You are attempting to build Sage on the FreeBSD operating system

...


as it should have been all along, if I change #! /bin/sh

to bash in the 1st line of configure. 


Gory details, if anyone cares:

without this, there are apparent bash-isms in ./configure:

in  line 2969/70:


test "x$ac_build_alias" = x && 

   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`


is meant to test that ac_build_alias is empty and call config.guess
And this fails; namely, if I remove test "x$ac_build_alias" = x && 
config.guess gets executed and I get a bit further:

checking for root user... no

checking build system type... amd64-unknown-freebsd11.0

checking host system type... Invalid configuration `x': machine `x' not recognized

configure: error: bash config/config.sub x failed


So it fails due to a similar problem involving "test" a bit later on.

Specifically, if I replace


 if test "x$host_alias" = x; then

 ac_cv_host=$ac_cv_build

else

 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||

   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5

fi


with 


  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||

    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5


I get through to 


checking build system type... amd64-unknown-freebsd11.0

checking host system type... amd64-unknown-freebsd11.0

configure: error: 

You are attempting to build Sage on the FreeBSD operating system

...


as it should have happened all along.



Any idea what causes this weirdness (perhaps it's just something one has to accept, that /bin/sh has to be very much

like bash nowadays)?


SHELL is set to /usr/local/bin/bash

which is 

$ bash --version

GNU bash, version 4.4.12(1)-release (amd64-portbld-freebsd11.0)

Maria MacCallum

unread,
Jan 17, 2018, 6:38:05 AM1/17/18
to sage-devel
THANK YOU!!!!!
Reply all
Reply to author
Forward
0 new messages