public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* Build problem on ABM AIX + solution
@ 2001-12-19 13:20 eric.van.der.velde
  2001-12-19 13:20 ` Brian Gough
  2001-12-19 13:20 ` Build problem on ABM AIX + solution gsl-discuss
  0 siblings, 2 replies; 14+ messages in thread
From: eric.van.der.velde @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss

Trying to make gsl on an IBM AIX 4.3 (xlc) system failed in the file
test/results.c (problems concerning the va_list)

The problem is that __STDC__ is not defined on an AIX system (which should
be), and the prepocessor takes the 'wrong' decision.
To solve this problem I modified the test/results file all the occurences
of

#ifdef __STDC__

to

#if defined(__STDC__) || defined(AIX)

Then I added -DAIX to the CFLAGS and ran ./configure again (followed by a
make)

I hope this can solve you build problems on AIX in the future



Here some info on the AIX compiler:

the IBM C compiler doesn't define __STDC__ (despite the fact
that its entirely ANSI compatible - actually it does define __STDC__ if
you put it in "strict" mode, but then it treats an allocation of an "int"
to an "unsigned int" as a severe error and stops. Thus nobody uses the
strict mode, thus __STDC__ is rarely defined. In addition it generates an
error message if you define __STDC__ manually....) Therefore could you put
in a || defined (AIX) to all your #ifdef __STDC__...?

Eric




___________________________________________________________________________

This e-mail is sent for the sole attention of the identified addressee and its
contents are provided for information purposes only. Fortis Bank makes no
warranty or representation as to the accuracy and completeness of any
information and does not assume whatever commitment hereby. Legally binding
obligation can only arise for, or be entered into on behalf of, Fortis Bank by
means of a written instrument, signed by two duly authorised representatives of
Fortis Bank. Fortis Bank excludes any liability whatsoever for any direct or
consequential loss arising from the use, or reliance on, this e-mail or its
contents.
___________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: how do you build a 64-bit library on IRIX
  2001-12-19 13:20         ` Brian Gough
@ 2001-12-19 13:20           ` William Brower
  2001-12-19 13:20             ` Brian Gough
  0 siblings, 1 reply; 14+ messages in thread
From: William Brower @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss

Brian Gough wrote:
> 
> gsl-discuss@lists.thewrittenword.com writes:
>  > On Thu, Sep 27, 2001 at 12:12:02PM -0400, Charles Yee wrote:
>  > > > How would you build 64-bit library from GSl 0.9.3 on IRIX?
>  > >
>  > > Thanks for your help.
>  >
>  > Have you tried
>  >   $ CC=cc CFLAGS="-64" LDFLAGS="-64" ./configure ...
>  >
>  > I think GCC can do 64-bit builds on IRIX as well.
>  >
> 
> I'll add this to the machine-specific installation notes.

A somewhat related question. I'm using GSL version 0.9.3
On these IRIX machines, one can build/install multiple versions of the
GSL (O32, N32, 64). The LD_LIBRARYxx_PATH family can help the
linker find the right one but...

I'm finding that the most recent install of GSL (ie. the one I install
last)
provides the "gsl-config" script which is used by gsl.m4
To remedy this, I use the ./configure --exec-prefix=/a/different/place
to configure GSL so I get multiple gsl-config scripts.

Then my application, which depends on GSL and therefore uses gsl.m4,
searches out gsl-config. To tell it which one to use, I
configure my application package with
./configure --with-gsl-exec-prefix=/a/certain/place

This all seems to work except that there seems to be bug
in gsl.m4 in extracting the major/minor/micro version numbers.

Specifically, while lines 37,38 (major) and 43,44 (minor) show:
    gsl_major_version=`$GSL_CONFIG $gsl_args --version | \
           sed 's/^\([[0-9]]*\).*/\1/'`
-- and --
    gsl_minor_version=`$GSL_CONFIG $gsl_args --version | \
           sed 's/^\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\).*/\2/'`

lines 49,50 (micro) show:
    gsl_micro_version=`$GSL_CONFIG $gsl_config_args --version | \
           sed
's/^\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\).*/\3/'`

The subtle difference is the argument passed to GSL_CONFIG. In the first
two cases, it gets sent "--with-gsl-exec-prefix=/a/certain/place" which
is wrong (gsl-config doesn't accept that (any?) argument). The micro
version
works, but it too may have a lurking problem. There is no variable 
called $gsl_config_args defined anywhere. I don't know what the intent
was for argument passing to $GLS_CONFIG but sending nothing works for
me!

Thanks,
Bill

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Build problem on ABM AIX + solution
  2001-12-19 13:20 Build problem on ABM AIX + solution eric.van.der.velde
  2001-12-19 13:20 ` Brian Gough
@ 2001-12-19 13:20 ` gsl-discuss
  1 sibling, 0 replies; 14+ messages in thread
From: gsl-discuss @ 2001-12-19 13:20 UTC (permalink / raw)
  To: eric.van.der.velde; +Cc: gsl-discuss

On Thu, Sep 27, 2001 at 08:36:36AM +0100, eric.van.der.velde@nl.fortisbank.com wrote:
> Trying to make gsl on an IBM AIX 4.3 (xlc) system failed in the file
> test/results.c (problems concerning the va_list)
> 
> The problem is that __STDC__ is not defined on an AIX system (which should
> be), and the prepocessor takes the 'wrong' decision.
> To solve this problem I modified the test/results file all the occurences
> of
> 
> #ifdef __STDC__
> 
> to
> 
> #if defined(__STDC__) || defined(AIX)
> 
> Then I added -DAIX to the CFLAGS and ran ./configure again (followed by a
> make)
> 
> I hope this can solve you build problems on AIX in the future

Ick! Please do *not* do this. Platform-specific stuff like this is
ugly. A more proper fix should be found.

> Here some info on the AIX compiler:
> 
> the IBM C compiler doesn't define __STDC__ (despite the fact
> that its entirely ANSI compatible - actually it does define __STDC__ if
> you put it in "strict" mode, but then it treats an allocation of an "int"
> to an "unsigned int" as a severe error and stops. Thus nobody uses the
> strict mode, thus __STDC__ is rarely defined. In addition it generates an
> error message if you define __STDC__ manually....) Therefore could you put
> in a || defined (AIX) to all your #ifdef __STDC__...?

I have xlc 5.0.2.0. Without *any* options, __STDC__ == 1. What do you
consider "strict" mode? -qlanglvl=ansi?

We built gsl-0.9.2 with xlc and -qlanglvl=ansi and test/results.c
compiled fine.

-- 
albert chin (china@thewrittenword.com)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: how do you build a 64-bit library on IRIX
  2001-12-19 13:20     ` how do you build a 64-bit library on IRIX Charles Yee
  2001-12-19 13:20       ` Brian Gough
@ 2001-12-19 13:20       ` gsl-discuss
  2001-12-19 13:20         ` Charles Yee
  2001-12-19 13:20         ` Brian Gough
  1 sibling, 2 replies; 14+ messages in thread
From: gsl-discuss @ 2001-12-19 13:20 UTC (permalink / raw)
  To: Charles Yee; +Cc: gsl-discuss

On Thu, Sep 27, 2001 at 12:12:02PM -0400, Charles Yee wrote:
> > How would you build 64-bit library from GSl 0.9.3 on IRIX?
> 
> Thanks for your help.

Have you tried
  $ CC=cc CFLAGS="-64" LDFLAGS="-64" ./configure ...

I think GCC can do 64-bit builds on IRIX as well.

-- 
albert chin (china@thewrittenword.com)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: how do you build a 64-bit library on IRIX
  2001-12-19 13:20     ` how do you build a 64-bit library on IRIX Charles Yee
@ 2001-12-19 13:20       ` Brian Gough
  2001-12-19 13:20       ` gsl-discuss
  1 sibling, 0 replies; 14+ messages in thread
From: Brian Gough @ 2001-12-19 13:20 UTC (permalink / raw)
  To: Charles Yee; +Cc: gsl-discuss

Charles Yee writes:
 > > How would you build 64-bit library from GSl 0.9.3 on IRIX?
 > 
 > Thanks for your help.
 > 

./configure ;  make should work. If there's an error you could send
it to the list.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Build problem on ABM AIX + solution
  2001-12-19 13:20 ` Brian Gough
@ 2001-12-19 13:20   ` gsl-discuss
  2001-12-19 13:20     ` Brian Gough
  2001-12-19 13:20     ` how do you build a 64-bit library on IRIX Charles Yee
  0 siblings, 2 replies; 14+ messages in thread
From: gsl-discuss @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss; +Cc: eric.van.der.velde

On Thu, Sep 27, 2001 at 12:09:56PM +0100, Brian Gough wrote:
> eric.van.der.velde@nl.fortisbank.com writes:
>  > Trying to make gsl on an IBM AIX 4.3 (xlc) system failed in the file
>  > test/results.c (problems concerning the va_list)
>  > 
>  > The problem is that __STDC__ is not defined on an AIX system (which should
>  > be), and the prepocessor takes the 'wrong' decision.
> 
> Thanks for the bug report.
> 
> Can you try this, 
> 
> go into test/results.c and change
> 
>   __STDC__ 
> 
> to 
> 
>   STDC_HEADERS
> 
> throughout (there are several occurrences).  Assuming the configure
> script has defined STDC_HEADERS correctly in config.h this should
> work.
> 
> Let me know and I'll make the change.

Ick. This is not necessary. We have *no* problems with GSL 0.9.2 on
AIX 4.3.2 with xlc 5.0.2.0.

-- 
albert chin (china@thewrittenword.com)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Build problem on ABM AIX + solution
  2001-12-19 13:20 Build problem on ABM AIX + solution eric.van.der.velde
@ 2001-12-19 13:20 ` Brian Gough
  2001-12-19 13:20   ` gsl-discuss
  2001-12-19 13:20 ` Build problem on ABM AIX + solution gsl-discuss
  1 sibling, 1 reply; 14+ messages in thread
From: Brian Gough @ 2001-12-19 13:20 UTC (permalink / raw)
  To: eric.van.der.velde; +Cc: gsl-discuss

eric.van.der.velde@nl.fortisbank.com writes:
 > Trying to make gsl on an IBM AIX 4.3 (xlc) system failed in the file
 > test/results.c (problems concerning the va_list)
 > 
 > The problem is that __STDC__ is not defined on an AIX system (which should
 > be), and the prepocessor takes the 'wrong' decision.

Thanks for the bug report.

Can you try this, 

go into test/results.c and change

  __STDC__ 

to 

  STDC_HEADERS

throughout (there are several occurrences).  Assuming the configure
script has defined STDC_HEADERS correctly in config.h this should
work.

Let me know and I'll make the change.

regards
Brian Gough

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Build problem on ABM AIX + solution
  2001-12-19 13:20   ` gsl-discuss
@ 2001-12-19 13:20     ` Brian Gough
  2001-12-19 13:20     ` how do you build a 64-bit library on IRIX Charles Yee
  1 sibling, 0 replies; 14+ messages in thread
From: Brian Gough @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss; +Cc: eric.van.der.velde

gsl-discuss@lists.thewrittenword.com writes:
 > > Let me know and I'll make the change.
 > 
 > Ick. This is not necessary. We have *no* problems with GSL 0.9.2 on
 > AIX 4.3.2 with xlc 5.0.2.0.
 > 

This change is recommended in the autoconf manual so I plan to apply
it anyway, but I'd like to know if it fixes this problem (it should do
I think).

 - Macro: AC_HEADER_STDC
     Define `STDC_HEADERS' if the system has ANSI C header files.
     ....

     Use `STDC_HEADERS' instead of `__STDC__' to determine whether the
     system has ANSI-compliant header files (and probably C library
     functions) because many systems that have GCC do not have ANSI C
     header files.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* how do you build a 64-bit library on IRIX
  2001-12-19 13:20   ` gsl-discuss
  2001-12-19 13:20     ` Brian Gough
@ 2001-12-19 13:20     ` Charles Yee
  2001-12-19 13:20       ` Brian Gough
  2001-12-19 13:20       ` gsl-discuss
  1 sibling, 2 replies; 14+ messages in thread
From: Charles Yee @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss

> How would you build 64-bit library from GSl 0.9.3 on IRIX?

Thanks for your help.

Charles


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: how do you build a 64-bit library on IRIX
  2001-12-19 13:20       ` gsl-discuss
  2001-12-19 13:20         ` Charles Yee
@ 2001-12-19 13:20         ` Brian Gough
  2001-12-19 13:20           ` William Brower
  1 sibling, 1 reply; 14+ messages in thread
From: Brian Gough @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss

gsl-discuss@lists.thewrittenword.com writes:
 > On Thu, Sep 27, 2001 at 12:12:02PM -0400, Charles Yee wrote:
 > > > How would you build 64-bit library from GSl 0.9.3 on IRIX?
 > > 
 > > Thanks for your help.
 > 
 > Have you tried
 >   $ CC=cc CFLAGS="-64" LDFLAGS="-64" ./configure ...
 > 
 > I think GCC can do 64-bit builds on IRIX as well.
 > 

I'll add this to the machine-specific installation notes.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: how do you build a 64-bit library on IRIX
  2001-12-19 13:20         ` Charles Yee
@ 2001-12-19 13:20           ` Brian Gough
  0 siblings, 0 replies; 14+ messages in thread
From: Brian Gough @ 2001-12-19 13:20 UTC (permalink / raw)
  To: Charles Yee; +Cc: gsl-discuss

Charles Yee writes:
 > I am using IRIX 6.5 on a SGI Origin.  On this machine, make uses gcc to
 > compile.  Would you know what  flags I would need to set in order to
 > make a 64-bit GSL library?
 > 
 > I have actually tried setting CFLAGS = -mabi=64 and LDFLAGS= -mabi=64.
 > However the build failed. I got the following error:
 > 
 >      ld32: FATAL 12: Expecting n32 objects: sasum.o is n64
 >      collect2: ld returned 4 exit status
 > 

Hmm.. nobody seems to know.  Maybe look on one of the IRIX newsgroups
as it is a general problem. If you find out let me know also and I
will add it to the installation notes.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: how do you build a 64-bit library on IRIX
  2001-12-19 13:20           ` William Brower
@ 2001-12-19 13:20             ` Brian Gough
  0 siblings, 0 replies; 14+ messages in thread
From: Brian Gough @ 2001-12-19 13:20 UTC (permalink / raw)
  To: William Brower; +Cc: gsl-discuss

William Brower writes:
 > This all seems to work except that there seems to be bug in gsl.m4
 > in extracting the major/minor/micro version numbers.  The subtle
 > difference is the argument passed to GSL_CONFIG. In the first two
 > cases, it gets sent "--with-gsl-exec-prefix=/a/certain/place" which
 > is wrong (gsl-config doesn't accept that (any?) argument).

Thanks for the bug report I've cleaned up the gsl.m4 file in CVS now.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: how do you build a 64-bit library on IRIX
  2001-12-19 13:20       ` gsl-discuss
@ 2001-12-19 13:20         ` Charles Yee
  2001-12-19 13:20           ` Brian Gough
  2001-12-19 13:20         ` Brian Gough
  1 sibling, 1 reply; 14+ messages in thread
From: Charles Yee @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss

gsl-discuss@lists.thewrittenword.com wrote:

> On Thu, Sep 27, 2001 at 12:12:02PM -0400, Charles Yee wrote:
> > > How would you build 64-bit library from GSl 0.9.3 on IRIX?
> >
> > Thanks for your help.
>
> Have you tried
>   $ CC=cc CFLAGS="-64" LDFLAGS="-64" ./configure ...
>
> I think GCC can do 64-bit builds on IRIX as well.
>
> --
> albert chin (china@thewrittenword.com)

I am using IRIX 6.5 on a SGI Origin.  On this machine, make uses gcc to
compile.  Would you know what  flags I would need to set in order to
make a 64-bit GSL library?

I have actually tried setting CFLAGS = -mabi=64 and LDFLAGS= -mabi=64.
However the build failed. I got the following error:

     ld32: FATAL 12: Expecting n32 objects: sasum.o is n64
     collect2: ld returned 4 exit status

I am not sure if I set the correct flags.

Thank you in advance.

-Charles Yee

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Build problem on ABM AIX + solution
@ 2001-12-19 13:20 eric.van.der.velde
  0 siblings, 0 replies; 14+ messages in thread
From: eric.van.der.velde @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss; +Cc: bjg

Replacing the __STDC__ define by STDC_HEADERS worked for me!


Thanks for your support, Eric



___________________________________________________________________________

This e-mail is sent for the sole attention of the identified addressee and its
contents are provided for information purposes only. Fortis Bank makes no
warranty or representation as to the accuracy and completeness of any
information and does not assume whatever commitment hereby. Legally binding
obligation can only arise for, or be entered into on behalf of, Fortis Bank by
means of a written instrument, signed by two duly authorised representatives of
Fortis Bank. Fortis Bank excludes any liability whatsoever for any direct or
consequential loss arising from the use, or reliance on, this e-mail or its
contents.
___________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2001-12-19 13:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-19 13:20 Build problem on ABM AIX + solution eric.van.der.velde
2001-12-19 13:20 ` Brian Gough
2001-12-19 13:20   ` gsl-discuss
2001-12-19 13:20     ` Brian Gough
2001-12-19 13:20     ` how do you build a 64-bit library on IRIX Charles Yee
2001-12-19 13:20       ` Brian Gough
2001-12-19 13:20       ` gsl-discuss
2001-12-19 13:20         ` Charles Yee
2001-12-19 13:20           ` Brian Gough
2001-12-19 13:20         ` Brian Gough
2001-12-19 13:20           ` William Brower
2001-12-19 13:20             ` Brian Gough
2001-12-19 13:20 ` Build problem on ABM AIX + solution gsl-discuss
  -- strict thread matches above, loose matches on Subject: below --
2001-12-19 13:20 eric.van.der.velde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).