Skip to Content.
Sympa Menu

charm - [charm] Trouble compiling Charm++ on Mac OS X 10.8.1 with llvm-g++-4.2 [partially solved]

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

[charm] Trouble compiling Charm++ on Mac OS X 10.8.1 with llvm-g++-4.2 [partially solved]


Chronological Thread 
  • From: Nick Chen <nicholas.chen AT mac.com>
  • To: charm AT cs.uiuc.edu
  • Cc: Laxmikant Kale <kale AT illinois.edu>
  • Subject: [charm] Trouble compiling Charm++ on Mac OS X 10.8.1 with llvm-g++-4.2 [partially solved]
  • Date: Tue, 4 Sep 2012 11:01:25 -0500
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

Hi Charm++ Developers/Users

I am student at the University of Illinois taking Prof. Kale's CS598lvk this
semester. Prof. Kale asked me to forward this message from the class
newsgroup to the list since it might be of interest to you.

I was encountering some trouble compiling charm++ on Mac OS X 10.8.1
(Mountain Lion) using the default llvm-g++-4.2. I believe I might have found
a solution for it. The details are in the quoted e-mail below.

--
Nick

> Hi
>
> SOLUTION (FOR NOW)
> ==================
>
> (Note: I'm using the latest version from the git repo but I think it would
> work with the charm_source.tar.gz posted on the website as well)
>
> If you are having this problem, it most likely means that you are on Mac OS
> X 10.8 and above. For the purpose of this class, since we are following the
> options that Phil demonstrated in class, we can just by pass the whole
> build menu and use this as a shortcut:
>
> ./build LIBS net-darwin-x86_64 gcc smp -j4 -g -O0
> -mmacosx-version-min=10.7
>
> The keyword here is the "-mmacox-version-min". By default, Mountain Lion
> does not install the older SDKs, e.g. Mac OS X 10.5, 10.6 so we should
> specify our min version to be 10.7. This parameter sets certain flags in
> the header files for the C++ include files to prevent the instantiation
> errors that I was getting below.
>
> After this, you should be able to run the example that Phil showed in class:
>
> cd net-darwin-x86_64-smp-gcc/tests/charm++/simplearrayhello
> make
> ./charmrun ++local ./hello 25 +p4
>
>
> DEEPER EXPLANATION OF THE PROBLEM (FOR DEVELOPERS)
> ==================================================
>
> I found the solution to this problem by looking up the instantiation error
> on Google. It seems that the QtCreator folks were also having the same
> problem (see http://qt-project.org/forums/viewthread/19106/P15). I mimicked
> what they suggested and managed to charm++ and its other projects to
> compile.
>
> If you are interested, the man pages for gcc on the mac says:
>
> -mmacosx-version-min=version
> The earliest version of MacOS X that this executable will run on
> is
> version. Typical values of version include 10.1, 10.2, and
> 10.3.9.
>
> This value can also be set with the MACOSX_DEPLOYMENT_TARGET
> environment
> variable. If both the command-line option is specified and the
> environment variable is set, the command-line option will take
> precedence.
>
> If the compiler was built to use the system's headers by
> default, then the
> default for this option is the system version on which the
> compiler is
> running, otherwise the default is to make choices which are
> compatible
> with as many systems and code bases as possible.
>
> This value is not set by default for ARM targets.
>
> It seems that default value on my machine was set to something older than
> 10.7 even though the MACOSX_DEPLOYMENT_TARGET environment variable was not
> set.
>
> I hope this helps the developers a bit as they try to configure the build
> script to accommodate Mac OS X 10.8 and above.
>
> --
> Nick
>
>
> On 2012-08-30 17:34:37 +0000, Nick Chen said:
>
> Hi
>
> I'm having some trouble compiling Charm++ on my laptop.
>
> It starts the build and runs into some problems with the standard library.
> Here's the relevant snippet:
>
>
> In file included from controlPoints.C:2732:
> controlPoints.h: In instantiation of ‘std::basic_ostream<_CharT, _Traits>&
> std::operator<<(std::basic_ostream<_CharT, _Traits>&, const
> std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits =
> std::char_traits<char>, _Alloc = std::allocator<char>]’:
> controlPoints.h:449: instantiated from here
> controlPoints.h:449: error: explicit instantiation of
> ‘std::basic_ostream<_CharT, _Traits>&
> std::operator<<(std::basic_ostream<_CharT, _Traits>&, const
> std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits =
> std::char_traits<char>, _Alloc = std::allocator<char>]’ but no definition
> available
> controlPoints.h: In instantiation of ‘std::basic_ostream<_CharT, _Traits>&
> std::operator<<(std::basic_ostream<_CharT, _Traits>&, const
> std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits =
> std::char_traits<char>, _Alloc = std::allocator<char>]’:
> controlPoints.h:449: instantiated from here
> controlPoints.h:449: error: explicit instantiation of
> ‘std::basic_ostream<_CharT, _Traits>&
> std::operator<<(std::basic_ostream<_CharT, _Traits>&, const
> std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits =
> std::char_traits<char>, _Alloc = std::allocator<char>]’ but no definition
> available
> controlPoints.h: In instantiation of ‘std::basic_ostream<_CharT, _Traits>&
> std::operator<<(std::basic_ostream<_CharT, _Traits>&, const
> std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits =
> std::char_traits<char>, _Alloc = std::allocator<char>]’:
> controlPoints.h:449: instantiated from here
> controlPoints.h:449: error: explicit instantiation of
> ‘std::basic_ostream<_CharT, _Traits>&
> std::operator<<(std::basic_ostream<_CharT, _Traits>&, const
> std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits =
> std::char_traits<char>, _Alloc = std::allocator<char>]’ but no definition
> available
> controlPoints.h: In instantiation of ‘std::basic_ostream<_CharT, _Traits>&
> std::operator<<(std::basic_ostream<_CharT, _Traits>&, const
> std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits =
> std::char_traits<char>, _Alloc = std::allocator<char>]’:
> controlPoints.h:449: instantiated from here
> controlPoints.h:449: error: explicit instantiation of
> ‘std::basic_ostream<_CharT, _Traits>&
> std::operator<<(std::basic_ostream<_CharT, _Traits>&, const
> std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits =
> std::char_traits<char>, _Alloc = std::allocator<char>]’ but no definition
> available
> controlPoints.h: In instantiation of ‘std::basic_ostream<_CharT, _Traits>&
> std::operator<<(std::basic_ostream<_CharT, _Traits>&, const
> std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits =
> std::char_traits<char>, _Alloc = std::allocator<char>]’:
> controlPoints.h:449: instantiated from here
> controlPoints.h:449: error: explicit instantiation of
> ‘std::basic_ostream<_CharT, _Traits>&
> std::operator<<(std::basic_ostream<_CharT, _Traits>&, const
> std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits =
> std::char_traits<char>, _Alloc = std::allocator<char>]’ but no definition
> available
> Fatal Error by charmc in directory
> /Users/vazexqi/cs598lvk/charm/net-darwin-x86_64-smp/tmp
> Command g++ -m64 -fPIC -dynamic -fno-common -D_REENTRANT
> -I../bin/../include -D__CHARMC__=1 -I. -g -O0 -c controlPoints.C -o
> controlPoints.o returned error code 1
> charmc exiting...
> make: *** [controlPoints.o] Error 1
> -------------------------------------------------
> Charm++ NOT BUILT. Either cd into net-darwin-x86_64-smp/tmp and try
> to resolve the problems yourself, visit
> http://charm.cs.illinois.edu/
> for more information. Otherwise, email the developers at
> charm AT cs.illinois.edu
>
>
> Here are the compiler/compilation flags that it was using when it failed.
> g++ defaults to llvm-g++-4.2 on my machine.
>
> g++ -m64 -fPIC -dynamic -fno-common -D_REENTRANT -I../bin/../include
> -D__CHARMC__=1 -I. -g -O0 -c controlPoints.C -o controlPoints.o
>
> vazexqi@daigo:~/cs598lvk/charm|charm
> ⇒ which g++
> /usr/bin/g++
> vazexqi@daigo:~/cs598lvk/charm|charm
> ⇒ ls -al /usr/bin/g++
> lrwxr-xr-x 1 root wheel 12 Jul 31 19:34 /usr/bin/g++ -> llvm-g++-4.2
>
>
> I can stop by the PPL lab to show you the exact error as well.
>
>
>
>
> --
> Nick
>
>
>




  • [charm] Trouble compiling Charm++ on Mac OS X 10.8.1 with llvm-g++-4.2 [partially solved], Nick Chen, 09/04/2012

Archive powered by MHonArc 2.6.16.

Top of Page