#21130 closed defect (worksforme)
vtk5 doesn't ensure it's UsingTheRightCompiler
Reported by: | sc522@… | Owned by: | adfernandes (Andrew Fernandes) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.0 |
Keywords: | Cc: | jjstickel@… | |
Port: | vtk5 |
Description (last modified by skymoo (Adam Mercer))
After I upgrade gcc44 4.4.0 to 4.4.1, I cannot get through install of the port vtk5 (5.2.1). The error massage is listed below:
[ 5%] Built target vtkEncodeString make: *** [all] Error 2 Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_vtk5/work/VTK" && /usr/bin/make -j2 all " returned error 2 Command output: [ 5%] Building C object Utilities/vtkexodus2/CMakeFiles/vtkexoIIc.dir/exptim.o [ 5%] Building C object Utilities/vtkexodus2/CMakeFiles/vtkexoIIc.dir/exptt.o [ 5%] Building C object Utilities/vtkexodus2/CMakeFiles/vtkexoIIc.dir/expvan.o [ 5%] Building CXX object Utilities/vtkmetaio/CMakeFiles/vtkmetaio.dir/metaForm.o [ 5%] Building C object Utilities/vtkexodus2/CMakeFiles/vtkexoIIc.dir/expvar.o [ 5%] Building C object Utilities/vtkexodus2/CMakeFiles/vtkexoIIc.dir/expvnm.o [ 5%] Building C object Utilities/vtkexodus2/CMakeFiles/vtkexoIIc.dir/expvpa.o [ 5%] Building C object Utilities/vtkexodus2/CMakeFiles/vtkexoIIc.dir/expvpax.o [ 5%] Building C object Utilities/vtkexodus2/CMakeFiles/vtkexoIIc.dir/expvp.o [ 5%] Building CXX object Utilities/vtkmetaio/CMakeFiles/vtkmetaio.dir/metaArray.o [ 5%] Building C object Utilities/vtkexodus2/CMakeFiles/vtkexoIIc.dir/expvpc.o [ 5%] Building C object Utilities/vtkexodus2/CMakeFiles/vtkexoIIc.dir/expvtt.o [ 5%] Building C object Utilities/vtkexodus2/CMakeFiles/vtkexoIIc.dir/expvv.o [ 5%] Building C object Utilities/vtkexodus2/CMakeFiles/vtkexoIIc.dir/exupda.o [ 5%] Building C object Utilities/vtkexodus2/CMakeFiles/vtkexoIIc.dir/ex_utils.o Linking C shared library ../../bin/libvtkexoIIc.dylib [ 5%] Built target vtkexoIIc Scanning dependencies of target vtkEncodeString [ 5%] Building CXX object Utilities/EncodeString/CMakeFiles/vtkEncodeString.dir/vtkEncodeString.o Linking CXX shared library ../../bin/libvtkmetaio.dylib [ 5%] Built target vtkmetaio Scanning dependencies of target vtkftgl [ 5%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyph.o cc1plus: error: unrecognized command line option "-fpascal-strings" make[2]: *** [Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyph.o] Error 1 make[1]: *** [Utilities/ftgl/CMakeFiles/vtkftgl.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... Linking CXX executable ../../bin/vtkEncodeString [ 5%] Built target vtkEncodeString make: *** [all] Error 2 Warning: the following items did not execute (for vtk5): org.macports.activate org.macports.build org.macports.destroot org.macports.install Error: Status 1 encountered during processing.
It appears the -fpascal-strings is no longer supported by cc1. Could anyone point me to how to work this around. Many thanks.
Attachments (1)
Change History (13)
comment:1 Changed 15 years ago by skymoo (Adam Mercer)
Description: | modified (diff) |
---|---|
Milestone: | MacPorts 1.8.1 |
Priority: | High → Normal |
comment:2 Changed 15 years ago by tommccullough-tenica
comment:3 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
I'm not sure what building vtk5 has to do with gcc44, since the vtk5 portfile makes no mention of using gcc44. Please clean vtk5 and try again with the debug switch:
sudo port clean vtk5 sudo port -d install vtk5 build.jobs=1 2>&1 | tee ~/Desktop/vtk5.txt bzip2 ~/Desktop/vtk5.txt
Assuming it fails again, attach the file vtk5.txt.bz2 from your desktop to this ticket so we can see what's really going on.
comment:4 Changed 14 years ago by hans.ekkehard.plesser@…
The problem appears to be that the vtk5 Portfile does not ensure that the standard system compiler is used, ie gcc 4.2.1 on Snow Leopard, as it should according to MacPorts customs. Instead, whichever compiler is gcc
and g++
will be used.
I managed to compile vtk5 after I made gcc 4.2.1 the standard compiler using
sudo gcc_select gcc42
before installing vtk5.
comment:5 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | vtk5 -fpascal-strings gcc44 removed |
---|---|
Summary: | vtk5 failed to build after upgrade to gcc44 4.4.1 → vtk5 doesn't ensure it's UsingTheRightCompiler |
Yes, I agree. vtk5 should ensure it's UsingTheRightCompiler.
comment:7 Changed 14 years ago by jjstickel@…
I just got bit by this as well, with the latest vtk5 port (5.6.0; see ticket #26061). It is probably not so straightforward to specify the correct gcc when using cmake. At least it is not obvious to me, or I would provide a patch.
comment:8 Changed 14 years ago by jmroot (Joshua Root)
Owner: | changed from macports-tickets@… to adfernandes@… |
---|
Changed 14 years ago by adfernandes (Andrew Fernandes)
Attachment: | Portfile.diff added |
---|
comment:9 Changed 14 years ago by adfernandes (Andrew Fernandes)
Please see the attached 'Portfile.diff' - it should set up environment variables to ensure that the native apple gcc-4.2 is used. Could someone verify that this works?
comment:10 Changed 14 years ago by jjstickel@…
Hmm... I don't see the problem today. Without applying the patch, the following executed without errors:
$ sudo gcc_select mp-gcc44 $ sudo port -v build vtk5 -x11 -tcltk +python26
Maybe the bug has gone away on its own?
comment:11 Changed 14 years ago by adfernandes (Andrew Fernandes)
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Hmm... possibly... I just did the same test and things seemed to work correctly... I'm assuming the vtk561 0.0.1 patch fixed it...
comment:12 Changed 14 years ago by jmroot (Joshua Root)
configure.compiler gcc-4.2
is the default on 10.6 anyway (and you wouldn't want to change it on earlier OSes).
This might be a total red herring, and I'm sorry if it is...
I'm using snow leopard, and the python25 build is not complete on SL (framework stuff missing). One side effect of this is that the dylib used for creating wrappers is missing. When I tried to compile vtk5 a while back, it failed with a nonsensical message. I'm sorry that I don't remember what it was, but I thoroughly checked out the debug output and realized the trouble actually was python25 and the partial build. This will apparently not be fixed, by the way. The vtk-devel port allows the use python26.
You don't mention which version of osx you are using, but if you are using SL, this might be the problem.