On Jun 16, 2005, at 10:15 PM, Kevin Horton wrote:

Something very strange is going on here.  I tried to use gcc 3.3, but fink refused to comply:

% sudo gcc_select 3.3
Password:
Default compiler has been set to:
gcc version 3.3 20030304 (Apple Computer, Inc. build 1809)

% fink install dia
Information about 4667 packages read in 2 seconds.
The package 'dia' will be built and installed.
The following package will be installed or updated:
dia
dpkg-deb -b /sw/src/fink.build/root-fink-buildlock-dia-0.94-4 /sw/src/fink.build
dpkg-deb: building package `fink-buildlock-dia-0.94-4' in `/sw/src/fink.build/fink-buildlock-dia-0.94-4_2005.06.16-21.56.13_darwin-powerpc.deb'.
Setting build lock...
dpkg -i /sw/src/fink.build/fink-buildlock-dia-0.94-4_2005.06.16-21.56.13_darwin-powerpc.deb
Selecting previously deselected package fink-buildlock-dia-0.94-4.
(Reading database ... 61663 files and directories currently installed.)
Unpacking fink-buildlock-dia-0.94-4 (from .../fink-buildlock-dia-0.94-4_2005.06.16-21.56.13_darwin-powerpc.deb) ...
Setting up fink-buildlock-dia-0.94-4 (2005.06.16-21.56.13) ...
Removing build lock...
dpkg -r fink-buildlock-dia-0.94-4
(Reading database ... 61664 files and directories currently installed.)
Removing fink-buildlock-dia-0.94-4 ...
Failed: The package dia-0.94-4 must be compiled with gcc 4.0.0,
however, you currently have gcc 3.3 selected. To correct
this problem, run the command:

    sudo gcc_select 4.0

===============
I took a look at dia.info, and it had a line calling for gcc 3.3:

GCC: 3.3

I commented out the GCC: 3.3 line, and now fink deigns to allow me to select gcc 3.3.  Dia built OK, and seems to run properly, once I was able to select gcc 3.3

Thanks for the assistance.

This certainly needs to be better documented.  Here is the story:

We would prefer everybody to run fink with gcc_select set to its most current value (which is 3.3 for 10.3 and 4.0 for 10.4).  This way, when there are bugs, we don't have to check on which compiler the user was using.  Also, having people do this helps achieve one of fink's goals, which is to have packages build the same no matter who builds them.

However, the only time we actually try to enforce this is when the ever-changing g++ ABI is involved, because that's one time we are sure that having the wrong compiler selected will lead to disaster.  We indicate that the g++ compiler is being used by means of the GCC field, which helps developers keep track of *which* version of g++ is required.

The way this works in practice is that if the GCC field appears at all within a fink package, then fink insists that the gcc_select is set to its most current value.  Package maintainers are expected to handle cases in which g++ should be different than that by doing things to their package (perhaps with the SetCXX flag).

What makes this a bit confusing is that in the 10.4-transitional tree, we want you to set gcc_select to 4.0 but also, behind the scenes, fink is guaranteeing that g++ will be version 3.3 and not version 4.0.  This lets us use all the old "GCC: 3.3" packages during a transitional period, while we get ready for the full conversion to g++-4.0.

Hope this helps.

  -- Dave
 

Reply via email to