[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Compiling & Testing New Interpolation Type
From: |
Dave Allured - NOAA Affiliate |
Subject: |
Re: [Help-gsl] Compiling & Testing New Interpolation Type |
Date: |
Wed, 19 Mar 2014 13:03:08 -0600 |
This may be of some help for debugging. i would like to report a
problem-free build of GSL 1.16 on Mac OS. I sent this to
Jean-François yesterday,
but forgot to CC the mailing list.
One significant difference is that Jean-François's Mac OS version is 10.9.2,
mine is 10.8.5.
I used clang, the LLVM/Apple C compiler, not GCC which sometimes gives me
invalid dynamic libraries on Mac. I think that GCC would be fine if you
are just making a static build. However, I made and tested the combined
static and dynamic build, which is the package default.
I made no modifications whatsoever to the GSL 1.16 source. There were no
problems with either make check or my application program which uses the
dynamic library.
CC=clang
CFLAGS=-g
./configure --prefix /Users/dallured/Disk/3rd/gsl/1.16
Then the usual autotools recipe: make, make check, make install. No sudo
because I install to a custom path in my user space.
Platform info:
mac56:~/Disk/3rd/gsl/1.16/logfiles 9> sw_vers
ProductName: Mac OS X
ProductVersion: 10.8.5
BuildVersion: 12F45
mac56:~/Disk/3rd/gsl/1.16/logfiles 10> clang -v
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
I have no idea where the PPC complaints are coming from. I can send or
post my configure and build logs, if that would be of any help
--Dave
On Wed, Mar 19, 2014 at 12:37 PM, Jean-François Caron
<address@hidden>wrote:
> I eventually found this post:
> http://permalink.gmane.org/gmane.comp.lib.gsl.bugs/173
>
> After doing the suggested commenting, GSL now fully completes "make", but
> "make check" claims to find two errors, here is the log:
> http://bpaste.net/show/190944/
>
> "make check" also prints a bunch of warnings about printf format strings
> on stderr, but more worryingly, at the end it also prints this to stderr:
> 94 warnings generated.
> Undefined symbols for architecture x86_64:
> "_square", referenced from:
> _E1 in test.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]: *** [test] Error 1
> make[1]: *** [check-am] Error 2
> make: *** [check-recursive] Error 1
>
> So I guess it couldn't compile one of the test programs?
>
> After "make install", I tried "make check" again, and now I get:
> test_static(20591,0x7fff73220310) malloc: *** error for object
> 0x7f9420500128: incorrect checksum for freed object - object was probably
> modified after being freed.
> *** set a breakpoint in malloc_error_break to debug
> /bin/sh: line 1: 20591 Abort trap: 6 ${dir}$tst
> FAIL: test_static
>
> Should I be worried about these tests failing, or can I ignore them and
> proceed to try to integrate my code into GSL?
>
> Jean-François
>
> On Mar 19, 2014, at 10:29 , Jean-François Caron <address@hidden>
> wrote:
>
> > Make is the command that is failing. I do the following:
> > CC=/usr/bin/clang CFLAGS=-g ./configure --disable-shared
> --prefix=/Users/jfcaron/Projects/GSL/compiled
> > make
> >
> > I use --disable-shared because the MacOS section of INSTALL recommends
> it, but removing it changes nothing.
> >
> > Many things are compiled (with clang), and eventually I reach this error
> message:
> > Making all in ieee-utils
> > /bin/sh ../libtool --mode=compile /usr/bin/clang -DHAVE_CONFIG_H -I. -I.
> -I.. -I.. -g -c -o print.lo `test -f 'print.c' || echo './'`print.c
> > /usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I.. -I.. -g -c print.c -o print.o
> > echo timestamp > print.lo
> > /bin/sh ../libtool --mode=compile /usr/bin/clang -DHAVE_CONFIG_H -I. -I.
> -I.. -I.. -g -c -o make_rep.lo `test -f 'make_rep.c' || echo
> './'`make_rep.c
> > /usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I.. -I.. -g -c make_rep.c -o
> make_rep.o
> > echo timestamp > make_rep.lo
> > /bin/sh ../libtool --mode=compile /usr/bin/clang -DHAVE_CONFIG_H -I. -I.
> -I.. -I.. -g -c -o env.lo `test -f 'env.c' || echo './'`env.c
> > /usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I.. -I.. -g -c env.c -o env.o
> > echo timestamp > env.lo
> > /bin/sh ../libtool --mode=compile /usr/bin/clang -DHAVE_CONFIG_H -I. -I.
> -I.. -I.. -g -c -o fp.lo `test -f 'fp.c' || echo './'`fp.c
> > /usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I.. -I.. -g -c fp.c -o fp.o
> > In file included from fp.c:34:
> > ./fp-darwin.c:20:10: fatal error: 'architecture/ppc/fp_regs.h' file not
> found
> > #include <architecture/ppc/fp_regs.h>
> > ^
> > 1 error generated.
> > make[2]: *** [fp.lo] Error 1
> > make[1]: *** [all-recursive] Error 1
> > make: *** [all] Error 2
> >
> > I have read the INSTALL sections about MacOS and PPC platforms, but they
> don't seem to be relevant to this issue. The compilation error occurs
> while making the ieee-utils target, in the file fp-darwin.c. It seems that
> something expects all MacOS hosts to still be PPC machines? The
> ./configure step is able to figure it out:
> >
> > checking build system type... i686-apple-darwin13.1.0
> >
> > Here is the output of sw_vers and clang -v on my system:
> >
> > address@hidden:~/Projects/GSL/gsl-1.6$ sw_vers
> > ProductName: Mac OS X
> > ProductVersion: 10.9.2
> > BuildVersion: 13C64
> > address@hidden:~/Projects/GSL/gsl-1.6$ clang -v
> > Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
> > Target: x86_64-apple-darwin13.1.0
> > Thread model: posix
> >
> > Thanks for the help so far. Let me know if I should paste the entire
> configure & make logs, or if I can provide other information for figuring
> this out.
> >
> > Jean-François
> >
> > On Mar 18, 2014, at 18:14 , Patrick Alken <address@hidden>
> wrote:
> >
> >> Hi,
> >>
> >> Could you be more specific about the errors you are getting? Does
> >> configure fail or does make fail?
> >>
> >> There is also a section on MacOS compilation in the INSTALL file (search
> >> for Hints for MacOS X and PowerPC)
> >>
> >> As far as testing, you could edit interpolation/test.c and add a new
> >> routine test_steffen().
> >>
> >> You could also simply write a standalone test program and link it again
> >> the GSL library, without needing to compile it into GSL.
> >>
> >> On 03/18/2014 05:47 PM, Jean-François Caron wrote:
> >>> Hi, several times now I've needed a monotonic interpolation method. I
> saw some posts from 2 years ago on this list from someone who implemented
> the method from Steffen (1990), but it never got integrated into GSL and I
> couldn't contact that person.
> >>>
> >>> I have now also implemented Steffen's interpolation algorithm by
> copying the existing akima.c file, but I am quite at a loss as to how to
> compile & test the code. I normally use GSL installed from MacPorts which
> handles all the compilation. I tried wget'ing the archive for GSL 1.6 and
> doing ./configure && make, but then I get errors about the PPC architecture
> (this is an x86 mac).
> >>>
> >>> Could someone walk me through the steps for compiling & testing my
> steffen.c code? My starting point:
> >>> - a fresh download and ./configure of GSL 1.6
> >>> - steffen.c placed in $GSL/interpolation
> >>>
> >>> I don't need people to write the test program itself, I just need to
> get to something that will compile with "int main(void){return 0;}". I can
> probably handle the rest of the testing.
> >>>
> >>> Thanks for any help,
> >>> Jean-François Caron
> >>>
> >>> Old posts about this:
> >>> http://lists.gnu.org/archive/html/help-gsl/2012-03/msg00009.html
> >>>
> >>
> >>
> >
>
>
- [Help-gsl] Compiling & Testing New Interpolation Type, Jean-François Caron, 2014/03/18
- Re: [Help-gsl] Compiling & Testing New Interpolation Type, Jean-François Caron, 2014/03/18
- Re: [Help-gsl] Compiling & Testing New Interpolation Type, Patrick Alken, 2014/03/18
- Re: [Help-gsl] Compiling & Testing New Interpolation Type, Jean-François Caron, 2014/03/19
- Re: [Help-gsl] Compiling & Testing New Interpolation Type, Jean-François Caron, 2014/03/19
- Re: [Help-gsl] Compiling & Testing New Interpolation Type,
Dave Allured - NOAA Affiliate <=
- Re: [Help-gsl] Compiling & Testing New Interpolation Type, Patrick Alken, 2014/03/19
- Re: [Help-gsl] Compiling & Testing New Interpolation Type, Jean-Francois Caron, 2014/03/19
- Re: [Help-gsl] Compiling & Testing New Interpolation Type, Patrick Alken, 2014/03/19
- Re: [Help-gsl] Compiling & Testing New Interpolation Type, Patrick Alken, 2014/03/19
- Re: [Help-gsl] Compiling & Testing New Interpolation Type, Dave Allured - NOAA Affiliate, 2014/03/19
- Re: [Help-gsl] Compiling & Testing New Interpolation Type, Jean-Francois Caron, 2014/03/19
- Re: [Help-gsl] Compiling & Testing New Interpolation Type, Patrick Alken, 2014/03/19
- Re: [Help-gsl] Compiling & Testing New Interpolation Type, Dave Allured - NOAA Affiliate, 2014/03/19
- Re: [Help-gsl] Compiling & Testing New Interpolation Type, Jean-François Caron, 2014/03/20
- Re: [Help-gsl] Compiling & Testing New Interpolation Type, Patrick Alken, 2014/03/20