This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compiling GSL with other compiler


Brian,

Thank you for your reply.
I removed config.cache and now I can point the Makefile
to CC instead of gcc.

However, I'm experiencing compile problem when compiling
using CC. I'm using CC compiler from Solaris 7 (SunWSpro 5.0).
Have the GSL library been compiled/tested on this platform?

The problem I'm having is when compiling utils/memcpy.c:
  "memcpy.c", line 10: Error: destaddr is not defined.

I tried creating 2 Makefiles for the "utils" directory:
one with gcc (using ./configure) and another using CC
(using: env CC=CC ./configure).
I compared the two Makefiles and noticed that the
one using CC wants to compile extra files like
memcpy, memmove, etc. See the following Makefile diffs:

-----------[changed 64-65]-------------|-----------[changed to
64-65]----------
CC = CC                                | CC = gcc
CPP = CC -E                            | CPP = gcc -E
                                      -|-
-------------[changed 87]--------------|------------[changed to
87]------------
libutils_la_LIBADD =  memcpy.o memmove+| libutils_la_LIBADD =  
                                      -|-
-------------[changed 99]--------------|------------[changed to
99]------------
LIBS =                                 | LIBS = -lm 
                                      -|-
------------[changed 101]--------------|------------[changed to
101]-----------
libutils_la_DEPENDENCIES =   memcpy.o +| libutils_la_DEPENDENCIES =  
                                      -|-
------------[changed 103]--------------|------------[changed to
103]-----------
CFLAGS = -g                            | CFLAGS = -g -O2
                                      -|-

Is this to be expected?
Is there anything else I need to do to compile using other
compiler like my CC compiler?

I pasted the log from my "env CC=CC ./configure" run and
also the log when I ran make.

Thanks for your help, it's very much appreciated.

----- begin log from configure script ----
cgunadi@jeckyll{SunOS} /data/fpinit/cgunadi/gsl/gsl-1.1>env CC=CC
./configure
loading cache ./config.cache
checking for a BSD compatible install... (cached)
/usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking whether make sets ${MAKE}... (cached) yes
checking host system type... sparc-sun-solaris2.7
checking for gcc... (cached) CC
checking whether the C compiler (CC  ) works... yes
checking whether the C compiler (CC  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) no
checking whether CC accepts -g... (cached) yes
checking how to run the C preprocessor... (cached) CC -E
checking for a BSD compatible install... /usr/local/bin/ginstall -c
checking whether ln -s works... (cached) yes
checking build system type... sparc-sun-solaris2.7
checking for ranlib... (cached) ranlib
checking for ar... (cached) ar
checking for Cygwin environment... (cached) no
checking for mingw32 environment... (cached) no
checking for non-GNU ld... (cached) /usr/ucb/ld
checking if the linker (/usr/ucb/ld) is GNU ld... (cached) no
checking for /usr/ucb/ld option to reload object files... (cached) -r
checking for BSD-compatible nm... (cached) /usr/xpg4/bin/nm -p
checking how to recognise dependant libraries... (cached) pass_all
checking for object suffix... (cached) o
checking for executable suffix... (cached) no
checking command to parse /usr/xpg4/bin/nm -p output... (cached) ok
checking for dlfcn.h... (cached) yes
checking for ranlib... (cached) ranlib
checking for strip... (cached) strip
checking for objdir... .libs
checking for CC option to produce PIC... (cached)  -KPIC
checking if CC PIC flag  -KPIC works... (cached) yes
checking if CC static flag -Bstatic works... (cached) yes
checking if CC supports -c -o file.o... (cached) yes
checking if CC supports -c -o file.lo... (cached) yes
checking whether the linker (/usr/ucb/ld) supports shared libraries...
yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... solaris2.7 ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
creating libtool
checking for ANSI C header files... (cached) no
checking for size_t... (cached) yes
checking for working const... (cached) no
checking for inline... (cached) inline
checking for extern inline... (cached) no
checking for main in -lm... (cached) no
checking for hypot... (cached) no
checking for expm1... (cached) no
checking for acosh... (cached) no
checking for asinh... (cached) no
checking for atanh... (cached) no
checking for isinf... (cached) no
checking for isinf with <math.h>... no
checking for finite... (cached) no
checking for finite with <math.h>... no
checking for isfinite... (cached) no
checking for isfinite with <math.h>... no
checking for isnan... (cached) no
checking for isnan with <math.h>... yes
checking for log1p... (cached) no
checking for vprintf... (cached) no
checking for _doprnt... (cached) no
checking for memcpy... (cached) no
checking for memmove... (cached) no
checking for strdup... (cached) no
checking for strtol... (cached) no
checking for strtoul... (cached) no
checking for clock... (cached) no
checking for CLOCKS_PER_SEC... (cached) yes
checking for EXIT_SUCCESS and EXIT_FAILURE... (cached) yes
checking for IEEE arithmetic interface type... solaris
checking for cpu with extended floating point registers... sparc, no
checking for rounding-control compiler flags... none
checking for IEEE-conformance compiler flags... none
checking whether printf/scanf works with long double... yes
checking working IEEE comparisons... (cached) no
updating cache ./config.cache
creating ./config.status
creating gsl-config
creating gsl.pc
creating gsl_version.h
creating gsl.spec
creating gsl/Makefile
creating test/Makefile
creating err/Makefile
creating sys/Makefile
creating utils/Makefile
creating const/Makefile
creating min/Makefile
creating multimin/Makefile
creating ieee-utils/Makefile
creating fft/Makefile
creating specfunc/Makefile
creating dht/Makefile
creating fit/Makefile
creating multifit/Makefile
creating statistics/Makefile
creating sum/Makefile
creating roots/Makefile
creating multiroots/Makefile
creating ntuple/Makefile
creating poly/Makefile
creating qrng/Makefile
creating rng/Makefile
creating randist/Makefile
creating siman/Makefile
creating integration/Makefile
creating interpolation/Makefile
creating doc/Makefile
creating block/Makefile
creating vector/Makefile
creating matrix/Makefile
creating histogram/Makefile
creating monte/Makefile
creating ode-initval/Makefile
creating cblas/Makefile
creating blas/Makefile
creating linalg/Makefile
creating eigen/Makefile
creating permutation/Makefile
creating combination/Makefile
creating sort/Makefile
creating complex/Makefile
creating diff/Makefile
creating cheb/Makefile
creating Makefile
creating config.h
config.h is unchanged
---- end log from configure script ----


---- begin log from make/compile process ----
cgunadi@jeckyll{SunOS} /data/fpinit/cgunadi/gsl/gsl-1.1>make
make  all-recursive
Making all in gsl
rm -f gsl*.h
HEADERLIST="../gsl*.h ../*/gsl*.h"; \
for h in $HEADERLIST; do \
  BASENAME=`basename $h`; \
  ln -s $h $BASENAME; \
done
Making all in utils
CC -DHAVE_CONFIG_H -I. -I. -I..     -g -c memcpy.c
"memcpy.c", line 10: Error: destaddr is not defined.
"memcpy.c", line 15: Warning: The variable destaddr has not yet been
assigned a value.
"memcpy.c", line 17: Warning: The variable len has not yet been assigned
a value.
"memcpy.c", line 18: Warning: The variable srcaddr has not yet been
assigned a value.
"memcpy.c", line 20: Error: "}" expected instead of EOF.
2 Error(s) and 3 Warning(s) detected.
*** Error code 2
make: Fatal error: Command failed for target `memcpy.o'
Current working directory /data/fpinit/cgunadi/gsl/gsl-1.1/utils
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /data/fpinit/cgunadi/gsl/gsl-1.1
*** Error code 1
make: Fatal error: Command failed for target `all-recursive-am'
cgunadi@jeckyll{SunOS} /data/fpinit/cgunadi/gsl/gsl-1.1>
---- begin log from make/compile process ----


Regards,
= Cancan Gunadi



Brian Gough wrote:
> 
> Cancan Gunadi writes:
>  >  How can I configure the GSL Makefiles to compile with other
>  > compiler (i.e: cc or CC)?
>  >  I tried invoking the configure script like:
>  >    % env CC=cc ./configure
>  >  but the resulting Makefiles still points to gcc.
>  >  I'm using Solaris 7 platform.
>  >  Any quick helps is very much appreciated :)
>  >
> 
> If you've already run configure try,
> 
>   rm config.cache
> 
> If that does not work please send a complete log of the configure
> output.
> 
> regards
> Brian Gough

-- 

-------------------------------------------------------------
  Cancan Gunadi		             cgunadi@dal.asp.ti.com  
  ASIC APD Software Tools Team       work:
(214)480-6362                             
  Texas Instruments, Inc.                                
-------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]