5.6.9
HOST MACHINE and OPERATING SYSTEM:
openSUSE 11.1/SLES 10 and 11
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL):
gcc 4.4.0 and 3.3.6
THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]:
Built with GNU Autoconf
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE:
platform_linux.GNU
BUILD METHOD USED:
./configure
CONTENTS OF ACE_ROOT/bin/MakeProjectCreator/config/default.features:
AREA/CLASS/EXAMPLE AFFECTED:
DOES THE PROBLEM AFFECT:
COMPILATION?
Yes
LINKING?
On Unix systems, did you run make realclean first?
EXECUTION?
OTHER (please specify)?
Only my application is affected.
SYNOPSIS:
How do I chose which compiler to use to build my app when there are more
than one installed?
DESCRIPTION:
We have a number of different versions of gcc installed and we need to
pick one in our makefiles. Our makefiles are based on ACE makefiles. In
ACE 5.4 the only way to do this was to edit the platform_linux.GNU file
and change the setting of the variable CC and CXX. If we tried to set
these variables from inside our makefiles they would be reset by ACE
makeincludes. In ACE 5.6 it seems CC and CXX are set using ?= which
suggests that if we set these variables in our makefile, ACE
makeincludes will not alter it. Is this correct?
REPEAT BY:
SAMPLE FIX/WORKAROUND:
Regards, Micke.
Thanks for using the PRF form. You should be able to do this with the
traditional config.h approach.
Johnny
> _______________________________________________
> ace-users mailing list
> ace-...@list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/ace-users
When building ACE using configure method (as opposed to the traditional
method) no config.h file is created so there's nowhere to set the CC and
CXX variables.
And setting CC and CXX in config.h only sets the compiler for the ACE
build itself, not when you build your own applications that are using
ACE libraries as I want to do.
When building ACE using configure one can choose the compiler to use for
the ACE build by using configure options CC= and CXX=. But this only
affects the ACE build itself. When I want to build my own application
and link to the ACE libraries I need to specify the compiler in my own
makefile (which is a modified ACE makefile), I need to set the CC and
CXX variables. Previous versions of ACE reset these values in the
makeincludes. Now when ACE makeincludes use ?= to set CC and CXX I
should be able to choose the compiler in my makefile and have ACE
makeincludes honour it. Or should this be done in another way?
Regards, Micke.
I would recommend not to use configure, it is experimental and we don't test
the outcome of configure at runtime at all.
Johnny
> When building ACE using configure method (as opposed to the
> traditional
> method) no config.h file is created so there's nowhere to set
> the CC and CXX variables.
Right.
> And setting CC and CXX in config.h only sets the compiler for the
ACE
> build itself, not when you build your own applications that are
using
> ACE libraries as I want to do.
Right, this won't work.
> When building ACE using configure one can choose the compiler
> to use for
> the ACE build by using configure options CC= and CXX=. But this only
> affects the ACE build itself. When I want to build my own
application
> and link to the ACE libraries I need to specify the compiler in my
own
> makefile (which is a modified ACE makefile), I need to set the CC
and
> CXX variables. Previous versions of ACE reset these values in the
> makeincludes. Now when ACE makeincludes use ?= to set CC and CXX I
> should be able to choose the compiler in my makefile and have ACE
> makeincludes honour it. Or should this be done in another way?
Yes, you should be able to do that. If you set your makefile CC and
CXX to the same values you used when configuring, it should be ok.
However, note that mixing configure/autoconf (ACE) and traditional
makefile (your app) in the same build may not yield compatible
compile/link flags and paths. You should stick to one or the other.
You can use the pkgconfig info from the autoconf'd ACE build as input
to the makefiles variables, but I've never tried this.
Good luck,
-Steve
--
Steve Huston, Riverace Corporation
Total Lifecycle Support for Your Networked Applications
http://www.riverace.com