How can I verify I'm using the correct runtime libraries?
Michael Muratet
muratetm at gmail.com
Tue Dec 31 09:54:48 PST 2013
Greetings
I upgraded my g++ to take advantage of c++11 on my Macbook Pro on OS X 10.7.5.
sudo port install gcc_select
sudo port install gcc47
sudo port select --set gcc mp-gcc47
After I selected gc47
sudo port select --list gcc
Password:
Available versions for gcc:
gcc42
llvm-gcc42
mp-gcc47 (active)
none
and these links were created
lrwxr-xr-x 1 root admin 25B Dec 31 09:45 c++ -> /opt/local/bin/c++-mp-4.7
lrwxr-xr-x 1 root admin 25B Dec 31 09:45 cpp -> /opt/local/bin/cpp-mp-4.7
lrwxr-xr-x 1 root admin 25B Dec 31 09:45 g++ -> /opt/local/bin/g++-mp-4.7
lrwxr-xr-x 1 root admin 25B Dec 31 09:45 gcc -> /opt/local/bin/gcc-mp-4.7
lrwxr-xr-x 1 root admin 25B Dec 31 09:45 gcj -> /opt/local/bin/gcj-mp-4.7
lrwxr-xr-x 1 root admin 26B Dec 31 09:45 gcov -> /opt/local/bin/gcov-mp-4.7
lrwxr-xr-x 1 root admin 30B Dec 31 09:45 gfortran -> /opt/local/bin/gfortran-mp-4.7
I tried to use g++ and got
Michaels-MacBook-Pro:src mmuratet$ which g++
/opt/local/bin/g++
Michaels-MacBook-Pro:src mmuratet$ g++
g++-mp-4.7: error trying to exec '/opt/local/bin/i686-apple-darwin11-llvm-g++-4.2': execvp: No such file or directory
though the link target itself seems to work well enough
Michaels-MacBook-Pro:src mmuratet$ /opt/local/bin/g++-mp-4.7 --version
g++-mp-4.7 (MacPorts gcc47 4.7.3_3) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I can compile with the link target but the executable won't run, e.g.,
Michaels-MacBook-Pro:src mmuratet$ make clean
c++ -MM TwoBitGenome.cpp -MT "TwoBitGenome.o TwoBitGenome.d" -MF TwoBitGenome.d
rm -f ppi ./Amplicon.o ./PPI.o ./PPICalculator.o ./TargetSequence.o ./TwoBitGenome.o
Michaels-MacBook-Pro:src mmuratet$ make
c++ -c -ansi -pedantic -Wall -g -I/usr/local/include -I./ -o Amplicon.o Amplicon.cpp
In file included from Amplicon.cpp:8:0:
Amplicon.h: In constructor 'Amplicon::Amplicon()':
Amplicon.h:56:6: warning: 'Amplicon::roEndPos' will be initialized after [-Wreorder]
Amplicon.h:49:6: warning: 'int Amplicon::foStartPos' [-Wreorder]
Amplicon.cpp:10:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:59:8: warning: 'Amplicon::foPPIAvg' will be initialized after [-Wreorder]
Amplicon.h:58:8: warning: 'float Amplicon::fiPPIAvg' [-Wreorder]
Amplicon.cpp:10:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:61:8: warning: 'Amplicon::roPPIAvg' will be initialized after [-Wreorder]
Amplicon.h:60:8: warning: 'float Amplicon::riPPIAvg' [-Wreorder]
Amplicon.cpp:10:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h: In constructor 'Amplicon::Amplicon(ForwardAmpliconDirection, int, int, int, int, float, float)':
Amplicon.h:54:6: warning: 'Amplicon::fiEndPos' will be initialized after [-Wreorder]
Amplicon.h:50:6: warning: 'int Amplicon::fiStartPos' [-Wreorder]
Amplicon.cpp:16:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:53:6: warning: 'Amplicon::foEndPos' will be initialized after [-Wreorder]
Amplicon.h:49:6: warning: 'int Amplicon::foStartPos' [-Wreorder]
Amplicon.cpp:16:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:55:6: warning: 'Amplicon::riEndPos' will be initialized after [-Wreorder]
Amplicon.h:52:6: warning: 'int Amplicon::roStartPos' [-Wreorder]
Amplicon.cpp:16:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:59:8: warning: 'Amplicon::foPPIAvg' will be initialized after [-Wreorder]
Amplicon.h:58:8: warning: 'float Amplicon::fiPPIAvg' [-Wreorder]
Amplicon.cpp:16:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:61:8: warning: 'Amplicon::roPPIAvg' will be initialized after [-Wreorder]
Amplicon.h:60:8: warning: 'float Amplicon::riPPIAvg' [-Wreorder]
Amplicon.cpp:16:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h: In constructor 'Amplicon::Amplicon(ReverseAmpliconDirection, int, int, int, int, float, float)':
Amplicon.h:55:6: warning: 'Amplicon::riEndPos' will be initialized after [-Wreorder]
Amplicon.h:52:6: warning: 'int Amplicon::roStartPos' [-Wreorder]
Amplicon.cpp:22:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:56:6: warning: 'Amplicon::roEndPos' will be initialized after [-Wreorder]
Amplicon.h:54:6: warning: 'int Amplicon::fiEndPos' [-Wreorder]
Amplicon.cpp:22:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:54:6: warning: 'Amplicon::fiEndPos' will be initialized after [-Wreorder]
Amplicon.h:50:6: warning: 'int Amplicon::fiStartPos' [-Wreorder]
Amplicon.cpp:22:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:53:6: warning: 'Amplicon::foEndPos' will be initialized after [-Wreorder]
Amplicon.h:49:6: warning: 'int Amplicon::foStartPos' [-Wreorder]
Amplicon.cpp:22:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:61:8: warning: 'Amplicon::roPPIAvg' will be initialized after [-Wreorder]
Amplicon.h:60:8: warning: 'float Amplicon::riPPIAvg' [-Wreorder]
Amplicon.cpp:22:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:60:8: warning: 'Amplicon::riPPIAvg' will be initialized after [-Wreorder]
Amplicon.h:59:8: warning: 'float Amplicon::foPPIAvg' [-Wreorder]
Amplicon.cpp:22:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:59:8: warning: 'Amplicon::foPPIAvg' will be initialized after [-Wreorder]
Amplicon.h:58:8: warning: 'float Amplicon::fiPPIAvg' [-Wreorder]
Amplicon.cpp:22:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h: In constructor 'Amplicon::Amplicon(int, int, int, int, int, int, int, int, int, float, float, float, float)':
Amplicon.h:54:6: warning: 'Amplicon::fiEndPos' will be initialized after [-Wreorder]
Amplicon.h:50:6: warning: 'int Amplicon::fiStartPos' [-Wreorder]
Amplicon.cpp:28:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:53:6: warning: 'Amplicon::foEndPos' will be initialized after [-Wreorder]
Amplicon.h:49:6: warning: 'int Amplicon::foStartPos' [-Wreorder]
Amplicon.cpp:28:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:55:6: warning: 'Amplicon::riEndPos' will be initialized after [-Wreorder]
Amplicon.h:52:6: warning: 'int Amplicon::roStartPos' [-Wreorder]
Amplicon.cpp:28:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:59:8: warning: 'Amplicon::foPPIAvg' will be initialized after [-Wreorder]
Amplicon.h:58:8: warning: 'float Amplicon::fiPPIAvg' [-Wreorder]
Amplicon.cpp:28:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:61:8: warning: 'Amplicon::roPPIAvg' will be initialized after [-Wreorder]
Amplicon.h:60:8: warning: 'float Amplicon::riPPIAvg' [-Wreorder]
Amplicon.cpp:28:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h: In copy constructor 'Amplicon::Amplicon(const Amplicon&)':
Amplicon.h:56:6: warning: 'Amplicon::roEndPos' will be initialized after [-Wreorder]
Amplicon.h:49:6: warning: 'int Amplicon::foStartPos' [-Wreorder]
Amplicon.cpp:35:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:59:8: warning: 'Amplicon::foPPIAvg' will be initialized after [-Wreorder]
Amplicon.h:58:8: warning: 'float Amplicon::fiPPIAvg' [-Wreorder]
Amplicon.cpp:35:1: warning: when initialized here [-Wreorder]
In file included from Amplicon.cpp:8:0:
Amplicon.h:61:8: warning: 'Amplicon::roPPIAvg' will be initialized after [-Wreorder]
Amplicon.h:60:8: warning: 'float Amplicon::riPPIAvg' [-Wreorder]
Amplicon.cpp:35:1: warning: when initialized here [-Wreorder]
c++ -c -ansi -pedantic -Wall -g -I/usr/local/include -I./ -o PPI.o PPI.cpp
c++ -c -ansi -pedantic -Wall -g -I/usr/local/include -I./ -o PPICalculator.o PPICalculator.cpp
PPICalculator.cpp: In static member function 'static void PPICalculator::processSequence(int, const TargetSequence&, AmpliconList&, AmpliconList&)':
PPICalculator.cpp:83:10: warning: unused variable 'completedNormally' [-Wunused-variable]
PPICalculator.cpp: In static member function 'static bool PPICalculator::findAmplicons(const AmpliconList&, const AmpliconList&, AmpliconList&)':
PPICalculator.cpp:282:89: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
PPICalculator.cpp:282:171: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
c++ -c -ansi -pedantic -Wall -g -I/usr/local/include -I./ -o TargetSequence.o TargetSequence.cpp
c++ -c -ansi -pedantic -Wall -g -I/usr/local/include -I./ -o TwoBitGenome.o TwoBitGenome.cpp
c++ -o ppi ./Amplicon.o ./PPI.o ./PPICalculator.o ./TargetSequence.o ./TwoBitGenome.o -lsequence -lz
Michaels-MacBook-Pro:src mmuratet$ ./ppi
ppi(77039) malloc: *** error for object 0x7fff7ed2b860: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
A git clone of this directory compiles and runs on a ubuntu 3.8.0-29-generic #42~precise1-Ubuntu box.
I'm baffled. I have consulted the oracle at google, but what I've found doesn't solve the problem.
Any suggestions will be appreciated.
Cheers
Mike
More information about the macports-users
mailing list