Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#37792 closed defect (fixed)

vtk5@5.10.1 Build error - failure

Reported by: dialkforkaushik@… Owned by: adfernandes (Andrew Fernandes)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: istlota@…, cooljeanius (Eric Gallager)
Port: vtk5

Description

I tried to do a clean install of VTK5 with Python27 on Snow Leopard (10.6.8) but with no success. I had earlier been able to build VTK5 via ports and therefore suspect that version 5.10.1 is causing trouble. The tail of the relevant log file /opt/local/.../vtk5/main.log is as follows:

:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_vtk5/vtk5/work/VTK5.10.1'
:info:build /opt/local/bin/cmake -E cmake_progress_report /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_vtk5/vtk5/work/VTK5.10.1/CMakeFiles  50 51 52 53 54 55
:info:build [ 52%] Built target vtkIOTCL
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_vtk5/vtk5/work/VTK5.10.1'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_vtk5/vtk5/work/VTK5.10.1'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_vtk5/vtk5/work/VTK5.10.1" && /usr/bin/make -j2 -w all 
:info:build Exit code: 2
:error:build org.macports.build for port vtk5 returned: command execution failed
:debug:build Error code: CHILDSTATUS 40133 2
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: targets not executed for vtk5: org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Please see the log file for port vtk5 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_vtk5/vtk5/main.log

Unfortunately, I cannot attach the entire log file since it's 23 MB large.

I have tried following all suggested steps (clean, uninstall inactive, update, install) but to no avail. In fact, VTK5 fails to install even without specifying +python27 although that's what I was originally going for. Additionally, trying any other sensible combination of switches for the port also leads to failure.

I wish to request you to please let me know if there's something that I can do to ensure a successful build. Additionally, is there a way to grab the earlier version 10.5.0 which seems to be available at http://packages.macports.org/vtk5/ but which I couldn't get to (probably I didn't read the manual carefully enough).

Attachments (5)

mainlog.tar.bz2 (119.4 KB) - added by dialkforkaushik@… 12 years ago.
Generated log file, to go with submitted ticket
main.log.zip (111.8 KB) - added by istlota@… 12 years ago.
istlota's log from port install vtk5 +python27 which failed
031713-2-vtk-mainlog.zip (249.6 KB) - added by istlota@… 12 years ago.
Istlota's post-patch vtk5 with variant main.log
main.log.2.zip (740.6 KB) - added by istlota@… 12 years ago.
istlota 031813 vtk5 maim.log, after complete reinstall of MacPorts.
Portfile (8.4 KB) - added by adfernandes (Andrew Fernandes) 12 years ago.

Download all attachments as: .zip

Change History (35)

comment:1 Changed 12 years ago by larryv (Lawrence Velázquez)

Owner: changed from macports-tickets@… to adfernandes@…

Thanks for the ticket. In the future, please try to Cc any port maintainers.

If you could compress your main.log to a size that Trac accepts and attach the archive, that would be great.

Changed 12 years ago by dialkforkaushik@…

Attachment: mainlog.tar.bz2 added

Generated log file, to go with submitted ticket

comment:2 Changed 12 years ago by dialkforkaushik@…

I have added the generated log file.

comment:3 Changed 12 years ago by adfernandes (Andrew Fernandes)

Huh... I think this is a 10.6 and 10.7 problem (see #37711). I'm on 10.8.2 with Xcode 4.5.2, and it builds fine for me (python and tkctl variants, too).

Anybody have any ideas? I can't reproduce, unfortunately. (The log only tells me that the error happens with vtkIOTCL, as cmake loves to hide errors...)

comment:4 Changed 12 years ago by istlota@…

I experienced a similar problem using Snow Leopard on a 2007 Macbook. A couple of months or so ago, I port installed vtk5 without any variants. That built fine. But, after that, I attempted to port install py27-mayavi and that failed with a message suggesting some problem with vtk5. I had other things to do which kept me occupied until I attempted 'port install py27-mayavi' again today with same problem. I then did a 'port install vtk5 +python27'. That took a while to build, finally aborting with a similar main.log except 'Built target vtkIOTCL' stopped at 51% for me instead of 52% as it did for dailforkaushik. I then did a 'port uninstall vtk5', followed by 'sudo port selfupdate' , and 'sudo port uninstall inactive', which all worked. But when I attempted 'sudo port clean all', it failed indicating it could not open port py27-usb or change to its working directory. I will attach the main.log for the 'port install vtk5 +python27' failure.

Changed 12 years ago by istlota@…

Attachment: main.log.zip added

istlota's log from port install vtk5 +python27 which failed

comment:5 Changed 12 years ago by istlota@…

Cc: istlota@… added

Cc Me!

comment:6 Changed 12 years ago by istlota@…

To retrace my steps, I just port uninstall-ed and port clean-ed VTK5, then attempted to re-install it without the python27 variant [which I was able to do on 12/10/2012]. This failed again, this time with 'Built target vtkIOTCL' aborting at 52% just like dialforkaushik. Was the Mac Ports version of VTK5 different on 12/10/2012 than it is today and, if so, how can I port install the previous version?

comment:7 Changed 12 years ago by adfernandes (Andrew Fernandes)

Huh... the problem is that Snow Leopard isn't really supported by anyone, even the people who say that they support it. In reality, the number of people using it is so small that those builds rarely get a lot of testing, so you see a lot of breakage. So very often projects say "we support Snow Leopard", but what they mean is "we think that we build properly on it, or at least we don't do anything that should break it, but we never really tested it..." Sorry.

And yes, very astute observation regrading the vtk-5.10.1 on 12/10/2012 not being the same as the vtk-5.10.1 installed today. The problem was that VTK did a "stealth update", meaning that they replaced the tar.gz archive with a new one, but kept the filename and version exactly the same.

I do not know what changed. It might be that nothing changed and the files are identical (since gzip embeds the date of compression, the underlying tar archive might have identical files, but the checksums of the old and new archives don't match). Or, maybe they did a "hotfix" to patch an "oopsie" that broke 10.6 compatibility.

Unfortunately, I don't know how to retrieve prior archives; they should still be available on the macports mirrors (see the dist_subdir key in the guide, but I've never done this.

Also, unfortunately, I cannot reproduce, and the cmake logs do not give a lot of help in telling us what the exact problem is. Again... sorry.

comment:8 Changed 12 years ago by istlota@…

You are right in that we Snow Leopard users have become the red headed stepchildren of the Mac world. And, this may be the last straw that nudges me to Mountain Lion. But, before I make that leap, and for the other redheaded stepkids out there, I am going to go as far as I can with this because, for some bizarre reason, there was a time when VTK5 was installed on my Mac.

Some good news --> I did find a page which describes how to install older revs of a port which is https://trac.macports.org/wiki/howto/InstallingOlderPort . The bad news, I used that Way to try revs all the way back to 11 months ago but I still have not been able to successfully install VTK5 with or without the +python27 variant. So, whatever changed for me, it was not just a stealth update, or at least not just that alone. Since I am able to recreate the problem, I am going see if I can figure out some more details on what the problem is for cmake.

comment:9 Changed 12 years ago by dialkforkaushik@…

As I reported in my original posting, I wasn't as well able to install an older version of VTK5 using any combination of the variants. Anyways, I really like my Snow Leopard, and I have a work around for VTK5 at the moment (I was originally going for py27-mayavi which needed the VTK5 +python27 variant). However, I will very soon, and finally, be upgrading to Mountain Lion. Well, perhaps more like I have been dragged into doing so ! :-)

Thanks to @adfernandes, @istlota as well the MacPorts team for your best in attempting to resolve this !

comment:10 Changed 12 years ago by istlota@…

vtk.org has reports of Snow Leopard users having problems even when attempting to build without using Mac Ports. Some got it to work by building with the i386 switch [which I probably need since my kernel only does 32 bit] but I don't think the VTK5 Portfile offers such a variant. I tried +carbon as a hail mary desperation move, but that is a no go.

So, yeah, I will upgrade as well, to Lion since ML does not support my 2007 Macbook.

comment:11 in reply to:  10 Changed 12 years ago by adfernandes (Andrew Fernandes)

Replying to istlota@…:

vtk.org has reports of Snow Leopard users having problems even when attempting to build without using Mac Ports.

Thanks for looking into that and taking the time to report back!

comment:12 Changed 12 years ago by jovo@…

A workaround for the ":info:build cc1plus: error: /usr/lib/libIOKit.dylib: not a directory" error, as suggested in the VTK user forum http://vtk.1045678.n5.nabble.com/VTK-5-6-compilation-on-Mac-OS-X-10-6-7-td4388683.html to get VTK5 staged into OS X 10.6.8:
1) port clean vtk5
2) port install vtk5
3) vi /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_vtk5/vtk5/work/VTK5.10.1/CMakeCache.txt

399 //Path to a library.
400 //IOKit:FILEPATH=/usr/lib/libIOKit.dylib
401 IOKit:FILEPATH=/System/Library/Frameworks/IOKit.framework

4) port install vtk5

Of course this should be done in a Portfile but this works for me.
Regards, Johan

comment:13 Changed 12 years ago by istlota@…

I do not wish to appear to be beating a dead horse. But, in the interest of others who might wish to try and install mayavi, or VTK5, or gimp, with Snow Leopard:

1) The fix Johan mentioned was born from a failure to install VTK5 on Snow Leopard v10.6.7 .

2) I did not get that same error when port install vtk5 failed, but I am running Snow Leopard v10.6.8 which or may not matter. In any event, I tried editing IOKit:FILEPATH, but port install vtk5 failed again.

3) However, examination of the error msg [from the term session, not from the VTK5 main.log] revealed that there was a problem with the VTK5 buiild not finding gimp:

---> Scanning binaries for linking errors: 28.1% Warning: Error parsing file /Applications/MacPorts/GIMP.app/Contents/MacOS/GIMP: Error opening or reading file

4) Which makes sense because I have not installed the Mac Port for GIMP. That does, however, raise the question of if port install vtk5 knows gimp is a dependency.

5) I then tried a port install gimp, but that failed, with the same error about not being able to open or read the gimp file.

This has me thinking that, maybe, my initial problems with installing py27-mayavi were due to vtk5 failing to install, which was due to gimp failing to install. Ergo, that maybe the root of all these problems is that the mac port of gimp is incompatible with Snow Leopard v10.6.8.

Final note. Rather than upgrading to Lion, and opening the door to possible Lion compatibility issues with some of my apps which do work with Snow Leopard, I have been using an alternate Way to get mayavi working with Snow Leopard, which is to install the sage package [from sagemath.org because Mac Ports does not have a port for it]. One gotcha with that Way, however, is that sage only supports up to Python v2.7 .

comment:14 Changed 12 years ago by adfernandes (Andrew Fernandes)

When I have time I will try to roll a 10.6-specific patch for what Johan reported.

With regard to the GIMP error... this does not make any sense to me, AFIK vtk should have nothing to do with GIMP...

comment:15 Changed 12 years ago by adfernandes (Andrew Fernandes)

Okay - here is a patch to the Portfile; can someone test on 10.6 and see if this works?

--- Portfile	(revision 104122)
+++ Portfile	(working copy)
@@ -73,6 +73,11 @@
 
 build.env-append DYLD_LIBRARY_PATH=${worksrcpath}/bin
 
+if {${os.major} <= 10} {
+    configure.args-append  \
+        -DIOKit:FILEPATH=/System/Library/Frameworks/IOKit.framework
+}
+
 if {![variant_isset carbon] && ![variant_isset qt4_mac]} {
     default_variants +x11 +tcltk
 }

Thanks!

comment:16 in reply to:  13 Changed 12 years ago by larryv (Lawrence Velázquez)

Replying to istlota@…:

3) However, examination of the error msg [from the term session, not from the VTK5 main.log] revealed that there was a problem with the VTK5 buiild not finding gimp:

--->  Scanning binaries for linking errors: 28.1%
Warning: Error parsing file /Applications/MacPorts/GIMP.app/Contents/MacOS/GIMP: Error opening or reading file

This has nothing to do with the VTK build; it is output from rev-upgrade. Anything after “Installing [FOO]” or “Cleaning [FOO]” is a post-installation check for linking problems, across all ports.

4) Which makes sense because I have not installed the Mac Port for GIMP.

Why rev-upgrade is trying to read into a nonexistent /Applications/MacPorts/GIMP.app is a good question. Please open a separate ticket for it.

comment:17 Changed 12 years ago by istlota@…

Per input from from larryv, ran 'port -v rev-upgrade', got same error msg about GIMP, then opened ticket #38407 against rev-upgrade.

Last edited 12 years ago by istlota@… (previous) (diff)

comment:18 Changed 12 years ago by istlota@…

Per afernandes' new patch, I performed 'port uninstall vtk5', 'port clean vtk5', then 'port install vtk5'. The good news is that 'port installed vtk5' confirmed that vtk5 is now installed, albeit the install process gave the aforementioned rev-upgrade msg which is being addressed by ticket #38407. Other than that unexplained msg, I am at least now able to install vtk5, without variants, as I was once able to do at some point in the past.

The bad news is that I think I am now back to the original problem reported by dailforkushik. Ergo, when I attempt 'port vtk5 +python27' [this time using the same python27 variant dailforkushik used because 'port install py27-mayavi' requires it], that fails with a main.log which looks to my untrained eye to be the same one this ticket was originally opened for. I attached my latest main.log.

Changed 12 years ago by istlota@…

Attachment: 031713-2-vtk-mainlog.zip added

Istlota's post-patch vtk5 with variant main.log

comment:19 Changed 12 years ago by adfernandes (Andrew Fernandes)

Hmm... something is weird for Istlota's build. The log says that the error comes from IOKit, but what's happening is it is using the IOKit line as an include-directive as per

-I/usr/lib/libIOKit.dylib

which makes no sense.

In fact, in the log I cannot find mention of "IOKit.framework" anywhere, which makes me think that something went wrong in patching the portfile, cleaning, and re-building when the python variant is used.

Very odd. I also see no real changes that the cmake file or portfile should make with the python variant...

Johan, did the small Portfile patch work for you?

comment:20 Changed 12 years ago by istlota@…

I completely uninstalled MacPorts, then reinstalled it, as part of the process of resolving ticket #38407. I no longer am getting any inexplicable rev-upgrade msgs.

In order to keep a closer eye on exactly what has been, and has not been, installed, this time i installed MacPorts from the tarball, not the DMG installation file as before. The only port install cmds I issued after that were:

port install python27

port install python32

port install vtk5 +python27

VTK5, with the python27 variant, still failed to install. I will attach the vtk5 main.log from that latest failed attempt.

Changed 12 years ago by istlota@…

Attachment: main.log.2.zip added

istlota 031813 vtk5 maim.log, after complete reinstall of MacPorts.

comment:21 Changed 12 years ago by adfernandes (Andrew Fernandes)

Ah - istlota, thank you for going through all that effort, but did you apply the patch in #comment:15 to the Portfile? From your description, you installed vtk5 using the current Portfile.

I need someone on 10.6 to apply the patch and test it because I do not have access to a 10.6 machine.

To edit the portfile, you need to

sudo vi /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/vtk5/Portfile

assuming you've installed MacPorts to the default /opt/local location.

comment:22 Changed 12 years ago by istlota@…

Specifically, what should be inserted, deleted, replaced, or whatever in that file?

Changed 12 years ago by adfernandes (Andrew Fernandes)

Attachment: Portfile added

comment:23 Changed 12 years ago by adfernandes (Andrew Fernandes)

I just attached a file to this ticket called Portfile. Download and save it somewhere, and then

sudo cp -v [path-to-downloaded-Portfile] /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/vtk5/Portfile

Then

sudo port -dv uninstall vtk5
sudo port -dv clean vtk5
sudo port -dv install vtk5 +python27

That should, hopefully do it. If this fails, please

sudo port -dv clean vtk5
sudo port -dv install vtk5

and let me know if it works without the +python27 variant.

Thanks!

comment:24 Changed 12 years ago by cdev9@…

I don't know if my bug is related, but not having seen this ticket. Note: I am on Leopard, OS X 10.5.8

I had been trying to build py27-mayavi so first macports attempted to build vtk5 and I have the python27 variant turned on by default. At 51% into the build it died with the following..

make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_vtk5/vtk5/work/VTK5.10.1'
/opt/local/bin/cmake -E cmake_progress_report /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_vtk5/vtk5/work/VTK5.10.1/CMakeFiles  54 55 56 57
[ 51%] Built target vtkIOTCL
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_vtk5/vtk5/work/VTK5.10.1'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_vtk5/vtk5/work/VTK5.10.1'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_vtk5/vtk5/work/VTK5.10.1" && /usr/bin/make -j2 -w all 
Exit code: 2
Error: org.macports.build for port vtk5 returned: command execution failed
DEBUG: Error code: CHILDSTATUS 52297 2
DEBUG: Backtrace: command execution failed
    while executing
"system -nice 20 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
Warning: targets not executed for vtk5: org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Failed to install vtk5
'''DEBUG: could not read "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/envisage/unknown_extension_point.pyc": no such file or directory'''
    while executing
"::file type $file"
Please see the log file for port vtk5 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_vtk5/vtk5/main.log
Error: The following dependencies were not installed: vtk5
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port py27-mayavi failed

Looking at that directory, I see this

-rw-r--r--    1 root  wheel   2582 Dec 21  2011 service.py
-rw-r--r--    1 root  wheel   1142 Dec 21  2011 service_offer.py
-rw-r--r--    1 root  wheel   1307 Dec 21  2011 twisted_application.py
-rw-r--r--    1 root  wheel    263 Dec 21  2011 unknown_extension.py
-rw-r--r--    1 root  wheel    280 Dec 21  2011 unknown_extension_point.py


Perhaps the source has an error in it where it is calling for the .pyc file when it really wants the .py file?

Last edited 12 years ago by cdev9@… (previous) (diff)

comment:25 Changed 12 years ago by istlota@…

Downloaded Portfile, followed instructions [changing filespec to match where I have MacPorts installed on my Mac] to install vtk5 with python27 variant, and will update ticket with results after it completes. So far, getting more verbose status msgs.

comment:26 Changed 12 years ago by istlota@…

Hey, good news. VTK5 with the +python27 variant installed successfully when I used the Portfile and instructions provided by afernandes,

comment:27 in reply to:  24 Changed 12 years ago by adfernandes (Andrew Fernandes)

Replying to cdev9@…:

I don't know if my bug is related, but not having seen this ticket. Note: I am on Leopard, OS X 10.5.8

I had been trying to build py27-mayavi so first macports attempted to build vtk5 and I have the python27 variant turned on by default. At 51% into the build it died with the following..

Hi, cdev9 - a couple of points:

  • please open a new ticket for py27-mayavi as the error you're getting is due to that port, not vtk5
  • you are likely to have a lot of difficulty because you are on 10.5, which really is not supported or tested much, these days

comment:28 in reply to:  26 Changed 12 years ago by adfernandes (Andrew Fernandes)

Resolution: fixed
Status: newclosed

Replying to istlota@…:

Hey, good news. VTK5 with the +python27 variant installed successfully when I used the Portfile and instructions provided by afernandes,

Thanks. Committing and closing the ticket. r104206

comment:29 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:30 Changed 11 years ago by lutz.maibaum@…

I had the same problem as the original poster, but on a system running 10.7.5 Lion (Darwin 11.4.2). I modified the relevant if-statement in the portfile (see #comment:15) to

if {${os.major} <= 11} {

which seems to fix the problem for me. Perhaps this patch is required on Lion as well (as suggested by #37711)?

Note: See TracTickets for help on using tickets.