[sac-dev] Patch to make our build system support VPATH builds

Brian Savage savage at uri.edu
Mon Oct 6 09:35:17 PDT 2008


Kuang He,

To get it to work I needed to add the following line to confgure.in

AC_SUBST([abs_top_srcdir])
AC_SUBST([abs_top_builddir])

Cheers
Brian

On Oct 6, 2008, at  11:47 AM , Brian Savage wrote:

> Kuang He,
>
> The build on my system (OSX/Intel 10.4) fails.  The abs_top_srcdir  
> is not defined.
> I cannot find a resolution to this, but I will keep looking.
>
> I needed to rerun the bootstrap script (or autoreconf) as the  
> Makefile.in files needed to be regenerated from the Makefile.am files.
>
> I am using autoconf 2.60 and automake 1.9.6
>
> Cheers
> Brian
>
>
> On Oct 5, 2008, at  7:51 AM , George Helffrich wrote:
>
>> Dear All -
>>
>> 	I can confirm a successful vanilla build of Kuangs distribution  
>> on MacOS 10.3 and on FreeBSD 6.3.
>>
>> 	However, this build fails on a Solaris 5.7 system (due to a  
>> possibly unrelated problem).  Perhaps Arthur can investigate  
>> further.  My results are:
>>
>> ./configure
>> checking build system type... sparc-sun-solaris2.7
>> checking host system type... sparc-sun-solaris2.7
>> checking target system type... sparc-sun-solaris2.7
>> ...
>> checking for gcc... gcc
>> checking for C compiler default output file name...
>> configure: error: C compiler cannot create executables
>> See `config.log' for more details.
>> ------------
>>
>> gcc is so old (2.7.2) that is fails configure tests using -V.
>>
>> Forcing to use Sun cc is OK until subdirectory configure is used;  
>> then CC gets forgotten:
>>
>> -------------
>> ./configure CC=cc
>> checking build system type... sparc-sun-solaris2.7
>> checking host system type... sparc-sun-solaris2.7
>> checking target system type... sparc-sun-solaris2.7
>> ...
>>  configure: creating ./config.status
>> config.status: creating src/Makefile
>> config.status: creating utils/Makefile
>> config.status: creating libedit/Makefile
>> config.status: creating Makefile
>> config.status: creating inc/config.h
>> config.status: executing depfiles commands
>> configure:
>>
>> Compliation Options for sac (Seismic Analysis Code 101.2)
>>
>> CFLAGS         =
>> LDFLAGS        =
>> LIBS           = -ldl -lm -ltermcap
>> Debug          =
>> Optimization   =
>> Database       = off
>> Matlab         = off
>> X11-buffer     = on
>> X11-depth      = on
>> X_LIBS         =  -L/usr/openwin/lib
>> X_CFLAGS       =  -I/usr/openwin/include
>> Readline       = off
>> Editline       = on
>> Install Base   = /usr/local/sac
>> System         = sun_solaris2 (sparc-sun-solaris2.7)
>>
>> To compile sac type make
>> #make
>> Making all in libedit
>> echo "Creating the Line Editing Library"
>> Creating the Line Editing Library
>> gzip -dc ./libedit-2.6.9.tar.gz | tar xvf -
>> x libedit-2.6.9, 0 bytes, 0 tape blocks
>> x libedit-2.6.9/makelist, 6742 bytes, 14 tape blocks
>> x libedit-2.6.9/CHANGES, 3853 bytes, 8 tape blocks
>> x libedit-2.6.9/INSTALL, 1604 bytes, 4 tape blocks
>> ...
>> (cd libedit-2.6.9 && env CFLAGS="-O -Wall -pipe -g3" LDFLAGS=""  
>> INSTALL="/tmp/sac-101.2/config/install-sh" ./configure --prefix=.. )
>> creating cache ./config.cache
>> checking for gcc... gcc
>> checking whether the C compiler (gcc -O -Wall -pipe -g3 ) works... no
>> configure: error: installation or configuration problem: C  
>> compiler cannot create executables.
>> *** Error code 1
>> make: Fatal error: Command failed for target `lib/libedit.a'
>> Current working directory /tmp/sac-101.2/libedit
>> *** Error code 1
>> make: Fatal error: Command failed for target `all-recursive'
>> -----------
>>
>> Then,
>> -----------
>> #make CC=cc
>> Making all in libedit
>> (cd libedit-2.6.9 && env CFLAGS="-O -Wall -pipe -g3" LDFLAGS=""  
>> INSTALL="/tmp/sac-101.2/config/install-sh" ./configure --prefix=.. )
>> loading cache ./config.cache
>> checking for gcc... cc -Xc -D__EXTENSIONS__
>> checking whether the C compiler (cc -Xc -D__EXTENSIONS__ -O -Wall - 
>> pipe -g3 ) works... no
>> configure: error: installation or configuration problem: C  
>> compiler cannot create executables.
>> *** Error code 1
>> make: Fatal error: Command failed for target `lib/libedit.a'
>> Current working directory /tmp/sac-101.2/libedit
>> *** Error code 1
>> make: Fatal error: Command failed for target `all-recursive'
>> --------------
>>
>> The generated Makefiles are so exquisitely baroque as to deter any  
>> sensible debug effort.  Suffice it to say that builds that deviate  
>> from a default system configuration seem unlikely to work.
>>
>> On 1 Oct 2008, at 21:11, Kuang He wrote:
>>
>>> On Wed, Oct 1, 2008 at 3:50 PM, George Helffrich  
>>> <george at gly.bris.ac.uk> wrote:
>>>>        VPATH is notoriously nonstandard among BSD, GNU and Sun  
>>>> make.
>>>>  Suggest that you validate its functioning on all those  
>>>> systems.  If
>>>> problematic, it might be too much hassle to make work right,  
>>>> despite being
>>>> potentially attractive for simplifying maintenance.
>>>
>>> Dear George,
>>>
>>> Thanks for pointing this out. I've only tested VPATH builds using  
>>> GNU
>>> make on linux only, and it worked. I don't have Solaris or Mac
>>> machines, so is there anybody who can help me test this patch on
>>> different operating systems other than linux (hopefully using  
>>> both GNU
>>> make and other make programs)? Thanks!
>>>
>>> It is already stated in the `Readme.buildsac' file that `the build
>>> goes best with GNU development tools, specifically the GNU gcc  
>>> and the
>>> GNU make'. I hope that my patch will at least work with GNU make on
>>> different systems. Hopefully it won't cause problem when using other
>>> make programs.
>>>
>>> I really like this feature since I can keep my source tree  
>>> uncluttered
>>> this, and I don't need to make copies of the source tree (which  
>>> is big
>>> and has thousands of files) at anytime.
>>>
>>>
>>> Best regards,
>>>
>>> -- 
>>> Kuang He
>>> Department of Physics
>>> University of Connecticut
>>> Storrs, CT 06269-3046
>>>
>>> Tel: +1.860.486.4919
>>> Web: http://www.phys.uconn.edu/~he/
>>> _______________________________________________
>>> sac-dev mailing list
>>> sac-dev at iris.washington.edu
>>> http://www.iris.washington.edu/mailman/listinfo/sac-dev
>>>
>>                                     George Helffrich
>>                                     george at geology.bristol.ac.uk
>>
>> _______________________________________________
>> sac-dev mailing list
>> sac-dev at iris.washington.edu
>> http://www.iris.washington.edu/mailman/listinfo/sac-dev
>
> _______________________________________________
> sac-dev mailing list
> sac-dev at iris.washington.edu
> http://www.iris.washington.edu/mailman/listinfo/sac-dev



More information about the sac-dev mailing list