On 8/6/12 4:33 PM, Kevin Horton wrote:
> On 2012-08-04, at 21:50 , Alexander Hansen <alexanderk.han...@gmail.com> 
> wrote:
> 
>> On 8/4/12 6:40 PM, Kevin Horton wrote:
>>> On 2012-08-04, at 21:32 , Alexander Hansen <alexanderk.han...@gmail.com> 
>>> wrote:
>>>
>>>> On 8/4/12 6:28 PM, Kevin Horton wrote:
>>>>> I'm trying to get the latest cadabra to build on 10.8, and these efforts 
>>>>> have run afoul of a configure failure with gcc47.
>>>>>
>>>>> Cadabra 1.31 won't compile with the Fink's default compilers - g++ 
>>>>> complains about a syntax error.  I tried gcc47 to see if that would work. 
>>>>>  I put "SetCXX: g++-4.7" in the info file, and added Depends and 
>>>>> BuildDepends on gcc47-shlibs and gcc47 respectively.  
>>>>>
>>>>> configure fails with:
>>>>>
>>>>> checking how to run the C++ preprocessor... /lib/cpp
>>>>> configure: error: C++ preprocessor "/lib/cpp" fails sanity check
>>>>> See `config.log' for more details.
>>>>> ### execution of /tmp/fink.ySYFx failed, exit code 1
>>>>> ### execution of /tmp/fink.zSk50 failed, exit code 1
>>>>> Removing runtime build-lock...
>>>>> Removing build-lock package...
>>>>> /sw/bin/dpkg-lockwait -r fink-buildlock-cadabra-1.31-1
>>>>> (Reading database ... 197960 files and directories currently installed.)
>>>>> Removing fink-buildlock-cadabra-1.31-1 ...
>>>>> Failed: phase compiling: cadabra-1.31-1 failed
>>>>>
>>>>> ===========
>>>>> config.log has:
>>>>> ## ---------------- ##
>>>>> ## Cache variables. ##
>>>>> ## ---------------- ##
>>>>> ac_cv_prog_CXXCPP=/lib/cpp
>>>>>
>>>>> ## ----------------- ##
>>>>> ## Output variables. ##
>>>>> ## ----------------- ##
>>>>> CXXCPP='/lib/cpp'
>>>>>
>>>>> |                      Syntax error
>>>>> configure:3505: /lib/cpp -I/sw/lib/pango-ft219/include/pango-1.0 
>>>>> -I/sw/lib/pango-ft219/include -I/sw/lib/freetype219/include/freetype2 
>>>>> -I/sw/lib/freetype219/include -I/sw/lib/fontconfig2/include -I/sw/include 
>>>>> -DX_LOCALE -fnested-functions conftest.cpp
>>>>> ./configure: line 3506: /lib/cpp: No such file or directory
>>>>>
>>>>>
>>>>> ===========
>>>>> I don't have a /lib/cpp.  I've got /usr/bin/cpp.  Why is configure 
>>>>> looking for /lib/cpp?
>>>>>
>>>>> Any advice is appreciated.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> --
>>>>> Kevin Horton
>>>>> Ottawa, Canada
>>>>>
>>>>>
>>>>>
>>>>
>>>> That'd be because "gcc-4.7" doesn't exist as an executable name.  Try
>>>> "g++-fsf-4.7".
>>>
>>> Thanks, but I still get the same failure even with "SetCXX: g++-fsf-4.7":
>>>
>>> checking whether g++-fsf-4.7 accepts -g... no
>>> checking whether ln -s works... yes
>>> checking whether make sets $(MAKE)... yes
>>> checking for a BSD-compatible install... /sw/bin/ginstall -c
>>> checking CFLAGS for maximum warnings... -Wall
>>> checking for lie... yes
>>> checking how to run the C++ preprocessor... /lib/cpp
>>> configure: error: C++ preprocessor "/lib/cpp" fails sanity check
>>> See `config.log' for more details.
>>> ### execution of /tmp/fink.QIBab failed, exit code 1
>>> ### execution of /tmp/fink.jr19R failed, exit code 1
>>> Removing runtime build-lock...
>>> Removing build-lock package...
>>> /sw/bin/dpkg-lockwait -r fink-buildlock-cadabra-1.31-1
>>> (Reading database ... 197960 files and directories currently installed.)
>>> Removing fink-buildlock-cadabra-1.31-1 ...
>>> Failed: phase compiling: cadabra-1.31-1 failed
>>>
>>> --
>>> Kevin Horton
>>> Ottawa, Canada
>>>
>>>
>>>
>>
>> How about e.g.
>>
>> export CXXCPP=/sw/bin/cpp-fsf-4.7
>>
>> in the CompileScript?
> 
> 
> I eventually found that the problems are due to one of my CPPFLAGS not being 
> support by GCC's g++: "-fnested-functions".  
> 
> I removed that flag, and configure works.  
> 
> But, no matter which compiler I use, I run into:
> 
> g++ -g -O2 -Wall -I. -I../src `pkg-config modglue --cflags` 
> -D"RELEASE=\"1.31\"" -D"DATETIME=\"`date | sed -e 's/  / /'`\"" 
> -DHOSTNAME=\"`hostname`\" -c -o display.o display.cc
> In file included from display.cc:24:
> In file included from ./modules/algebra.hh:29:
> ./youngtab.hh:602:18: error: invalid use of nonstatic data member 'rows'
>                        column_number=rows[row_number].size()-1;
>                                      ^~~~
> 
> 
> I get the same error with Fink's default g++, c++ and gcc47's g++.
> 
> I've asked cadabra's author which compilers he recommends.
> 
> Thanks for your help.
> 
> --
> Kevin Horton
> Ottawa, Canada
> 
> 
> 

Fink's default "c++" and "g++" are the same (clang++), unlike Apple's.

Try SetCXX: llvm-g++-4.2 if cadabra honors CXX.

-- 
Alexander Hansen, Ph.D.
Fink User Liaison
My package updates: http://finkakh.wordpress.com/

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to