Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#37356 closed defect (worksforme)

octave-devel @ 3.6.3 -- can't use fltk toolkit

Reported by: cdemills@… Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: anddam (Andrea D'Amore), garrick@…, MacPorts@…
Port: octave-devel

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hello,
myself and Ben Abbott tried to use the fltk toolkit. From inside octave:

available_graphics_toolkits 
ans = 
{ 
  [1,1] = fltk 
  [1,2] = gnuplot 
} 
graphics_toolkit fltk 
error: feval: function `__init_fltk__' not found 
error: called from: 
error:   /opt/local/share/octave/3.6.3/m/plot/graphics_toolkit.m at line 59, column 5 
which "__init_gnuplot__" 
`__init_gnuplot__' is a function from the file /opt/local/lib/octave/3.6.3/oct/x86_64-apple-darwin12.2.0/__init_gnuplot__.oct
 which "__init_fltk__" 
=> no reply

The dir /opt/local/lib/octave/3.6.3/oct/x86_64-apple-darwin12.2.0 contains both __init_gnuplot.oct and __init_fltk.oct as required:

file __init_gnuplot__.oct 
__init_gnuplot__.oct: Mach-O 64-bit bundle x86_64 
file __init_fltk__.oct         
__init_fltk__.oct: Mach-O 64-bit bundle x86_64 

I installed octave-devel straight from the macport.

Regards

Pascal

Attachments (1)

portinstalled (13.8 KB) - added by cdemills@… 12 years ago.

Download all attachments as: .zip

Change History (23)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: octave fltk removed
Owner: changed from macports-tickets@… to michaelld@…
Port: octave-devel added

comment:2 Changed 12 years ago by michaelld (Michael Dickens)

fltk works for me inside octave. I'm using "fltk-devel" as the providing port. Maybe "fltk" (not -devel) doesn't work? Try the devel version and see if that works.

comment:3 Changed 12 years ago by michaelld (Michael Dickens)

Resolution: worksforme
Status: newclosed

Closing due to lack of feedback.

comment:4 in reply to:  3 Changed 12 years ago by cdemills@…

Replying to michaelld@…:

Closing due to lack of feedback.

Sorry for the delay, I hadn't chances to look into this issue until recently

1) added fltk-devel => stil not working

2) Comparing __init_gnuplot__.oct and __init__fltk__oct with respect to libs:

otool -L __init_gnuplot__.oct
__init_gnuplot__.oct:
        /opt/local/lib/libstdc++.6.dylib (compatibility version 7.0.0,current version 7.17.0)
        /opt/local/lib/gcc45/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
        /opt/local/lib/octave/3.6.3/liboctinterp.1.dylib (compatibility version 2.0.0, current version 2.2.0)
        /opt/local/lib/octave/3.6.3/liboctave.1.dylib (compatibility version 3.0.0, current version 3.0.0)
        /opt/local/lib/octave/3.6.3/libcruft.1.dylib (compatibility version 2.0.0, current version 2.1.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
        /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib (compatibility version 1.0.0, current version 380.6.0)
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0)
        /opt/local/lib/gcc45/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

otool -L __init_fltk__.oct
__init_fltk__.oct:
        /opt/local/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.17.0)
        /opt/local/lib/gcc45/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
        /opt/local/lib/octave/3.6.3/liboctinterp.1.dylib (compatibility version 2.0.0, current version 2.2.0)
        /opt/local/lib/octave/3.6.3/liboctave.1.dylib (compatibility version 3.0.0, current version 3.0.0)
        /opt/local/lib/octave/3.6.3/libcruft.1.dylib (compatibility version 2.0.0, current version 2.1.0)
        /opt/local/lib/libfreetype.6.dylib (compatibility version 16.0.0, current version 16.0.0)
        /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.7)
        /opt/local/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.6)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
        /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib (compatibility version 1.0.0, current version 380.6.0)
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0)
        /opt/local/lib/gcc45/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

At first sight, no missing libs, fltk uses freetype6, z and bz2 as supplemental libs. I don't understand why __init_fltk__.oct is still considered as missing.

Regards

Pascal

comment:5 Changed 12 years ago by michaelld (Michael Dickens)

Resolution: worksforme
Status: closedreopened

What does "port installed" return for you? Maybe attach it as a text document would be best.

Changed 12 years ago by cdemills@…

Attachment: portinstalled added

comment:6 in reply to:  5 Changed 12 years ago by cdemills@…

Replying to michaelld@…:

What does "port installed" return for you? Maybe attach it as a text document would be best.

file 'portinstalled' enclosed.

I just updated MacPorts to 2.1.3. A new octave-devel version was rebuilt as octave-devel @3.6.3_1+accelerate+gcc45, and __init_ftlk__.oct is still unusable.

Regards

Pascal

comment:7 Changed 12 years ago by michaelld (Michael Dickens)

First, do the following to see if it works:

sudo port install octave-devel +fltk +accelerate +gcc45

Not sure if this makes any difference, but some of your installed ports are +gcc45 while others are +gcc47. Unless you cannot do otherwise, I strongly advise you to replace those with +gcc45 with +gcc47, then remove gcc45 and all of the old non-active cruft. In my experience, mixing GCC versions between various ports is a setup for serious issues down the road.

comment:8 in reply to:  7 Changed 12 years ago by cdemills@…

Replying to michaelld@…:

First, do the following to see if it works:

sudo port install octave-devel +fltk +accelerate +gcc45

Not sure if this makes any difference, but some of your installed ports are +gcc45 while others are +gcc47. Unless you cannot do otherwise, I strongly advise you to replace those with +gcc45 with +gcc47, then remove gcc45 and all of the old non-active cruft. In my experience, mixing GCC versions between various ports is a setup for serious issues down the road.

OK. Trying to migrate everything to +gcc47. While trying to remove gcc45, I got a message about atlas and arpack depending on it. So I rebuilt both with +gcc47, and uninstalled the gcc45 version. The strange thing is that

port list variant:gcc45

still shows atlas and arpack in the list. Is there some way with the port command to display, for each package, the compiler it depends from ? I mean, some kind of more verbose output ?

Regards

Pascal

comment:9 Changed 12 years ago by michaelld (Michael Dickens)

"port list" just lists ports that meet the criteria you've set, no matter if they are installed, active, or not (one or either). I think what you're looking for is:

port installed | grep active | grep +gcc45

to determine which ports are actively still using the +gcc45 variant. I don't know of a better way to do this, e.g., just using port FOO.

I also keep my MacPorts install nice and clean, generally removing anything that's not active:

bar=`port installed | grep -v active | sed -e 1d`
echo $bar

and, then if you like what you see, you can do:

sudo port uninstall $bar

I wish there were a port command to clean out old distfiles that are connected with these ports I'm uninstalling; have to do that by hand still, as far as I know. "sudo port clean --all $bar" would wipe out all distfiles.

comment:10 in reply to:  9 ; Changed 12 years ago by cdemills@…

Replying to michaelld@…:

"port list" just lists ports that meet the criteria you've set, no matter if they are installed, active, or not (one or either). I think what you're looking for is:

port installed | grep active | grep +gcc45

to determine which ports are actively still using the +gcc45 variant. I don't know of a better way to do this, e.g., just using port FOO.

I also keep my MacPorts install nice and clean, generally removing anything that's not active:

bar=`port installed | grep -v active | sed -e 1d`
echo $bar

and, then if you like what you see, you can do:

sudo port uninstall $bar

I wish there were a port command to clean out old distfiles that are connected with these ports I'm uninstalling; have to do that by hand still, as far as I know. "sudo port clean --all $bar" would wipe out all distfiles.

Hummmm ... recompiled octave-devel and all of its dependencies with +gcc47; same problem: __init_fltk__.oct is still not found; while it is available in the same dir as __init___gnuplot.oct

Pascal

comment:11 Changed 12 years ago by michaelld (Michael Dickens)

If

port installed octave-devel | grep active

does not return something that includes +fltk, then you need to install octave-devel including the +fltk variant; this variant is not enabled by default, and it was not enabled in the "portinstalled" list you provided above. Please verify this; if not, then do:

sudo port install octave-devel +fltk +accelerate +gcc47

or whatever variants you wish but including +fltk.

comment:12 Changed 12 years ago by accounts@…

It seems this problem is NOT exclusive to MacPorts. I am seeing the same exact issue on OpenSolaris. Please let me know if there is more helpful info I can post.

// From Package Manager //
Name:	math/octave
Summary:	octave High-level language, intended for numerical computations
Installed:	 3.6.3 (Build 5.11-0.151.1.7)
Size:	323.33 MB
Category:	Math
Publisher:	sfe
[555][athena: /export/home/myUser]$ cat /etc/release 
             OpenIndiana Development oi_151.1.7 X86 (powered by illumos)
        Copyright 2011 Oracle and/or its affiliates. All rights reserved.
                        Use is subject to license terms.
                           Assembled 03 October 2012

[556][athena: /export/home/myUser]$ uname -a
SunOS athena 5.11 oi_151a7 i86pc i386 i86pc Solaris
[557][athena: /export/home/myUser]$ which octave
/usr/bin/octave
[558][athena: /export/home/myUser]$ octave

GNU Octave, version 3.6.3
Copyright (C) 2012 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.
Octave was configured for "i386-pc-solaris2.11".
Additional information about Octave is available at http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html
Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type `news'.

octave:1> available_graphics_toolkits 
ans = 
{
  [1,1] = fltk
  [1,2] = gnuplot
}
octave:2> graphics_toolkit fltk
error: feval: function `__init_fltk__' not found
error: called from:
error:   /usr/share/octave/3.6.3/m/plot/graphics_toolkit.m at line 59, column 5
octave:2> 
octave:2> which "__init_gnuplot__"
`__init_gnuplot__' is a function from the file /usr/lib/octave/3.6.3/oct/i386-pc-solaris2.11/__init_gnuplot__.oct
octave:3> which "__init_fltk__"
octave:4> 

[559][athena: /export/home/myUser]$ slocate __init_gnuplot__
/usr/lib/octave/3.6.3/oct/i386-pc-solaris2.11/__init_gnuplot__.oct
[560][athena: /export/home/myUser]$ slocate fltk |grep -v SFE
/usr/lib/libfltk_images.so.1.1
/usr/lib/libfltk_gl.so.1.1
/usr/lib/libfltk.so.1.1
/usr/lib/libfltk_forms.so.1.1
/usr/lib/libfltk_gl.a
/usr/lib/libfltk_forms.so
/usr/lib/octave/3.6.3/oct/i386-pc-solaris2.11/__init_fltk__.oct
/usr/lib/octave/3.6.3/oct/i386-pc-solaris2.11/__fltk_uigetfile__.oct
/usr/lib/libfltk_images.so
/usr/lib/libfltk.so
/usr/lib/libfltk_gl.so
/usr/bin/fltk-config
/usr/share/doc/fltk
...
/usr/share/man/man3/fltk.3
/usr/share/octave/3.6.3/m/plot/private/__fltk_file_filter__.m
/usr/share/octave/3.6.3/m/plot/private/__uigetfile_fltk__.m
/usr/share/octave/3.6.3/m/plot/private/__fltk_print__.m
/usr/share/octave/3.6.3/m/plot/private/__fltk_ginput__.m
/usr/share/octave/3.6.3/m/plot/private/__uigetdir_fltk__.m
/usr/share/octave/3.6.3/m/plot/private/__uiputfile_fltk__.m
[561][athena: /export/home/myUser]$ 

comment:13 Changed 12 years ago by anddam (Andrea D'Amore)

Cc: and.damore@… added

Cc Me!

comment:14 in reply to:  10 Changed 12 years ago by anddam (Andrea D'Amore)

Replying to michaelld@…:

"port list" just lists ports that meet the criteria you've set, no matter if they are installed, active, or not (one or either). I think what you're looking for is:

port installed | grep active | grep +gcc45

Or

port echo active and variant:gcc45

comment:15 Changed 12 years ago by garrick@…

Cc: garrick@… added

Cc Me!

comment:16 in reply to:  10 Changed 12 years ago by anddam (Andrea D'Amore)

Replying to cdemills@…:

Hummmm ... recompiled octave-devel and all of its dependencies with +gcc47; same problem: __init_fltk__.oct is still not found; while it is available in the same dir as __init___gnuplot.oct

I'm able to use octave-devel 3.6.3-1 fltk backend using fltk (not fltk-devel) port on my 10.7 system using Xcode 4.6, I'd like to recap actual status of the package on your system:

  • Is your port tree updated? (port sync)
  • Did you rebuild octave-devel using -s option? (build-from-source option rather than fetching binary packages)
  • What's the actual command you ran in order to rebuild octave?
  • What's the current output of:
    port -v installed octave-devel fltk fltk-devel
    
Last edited 12 years ago by anddam (Andrea D'Amore) (previous) (diff)

comment:17 in reply to:  12 Changed 12 years ago by anddam (Andrea D'Amore)

Replying to accounts@…:

It seems this problem is NOT exclusive to MacPorts. I am seeing the same exact issue on OpenSolaris. Please let me know if there is more helpful info I can post.

And to confirm that today I stumbled into the very same issue on Arch Linux, another user had already reported it.

On Arch I was able to rebuild the package and have it working, the init_fltk.oct file had a different size than the one shipped with binary package from official repository.

comment:18 Changed 12 years ago by michaelld (Michael Dickens)

Is this ticket still an issue? The basic and original issue is that octave-devel was not installed with the +fltk variant. In order for FLTK (as the fltk or fltk-devel port) to be recognized by octave (as provided by the port octave-devel), you -have- to use the +fltk variant. The OP had installed octave-devel without +fltk, which is why it was not working even after fltk-devel was installed in place of fltk. Even when updating to a newer octave-devel and +gcc47, I don't believe that the OP chose the +fltk variant.

comment:19 Changed 12 years ago by accounts12@…

Michael, Thanks for the description. I haven't needed Octave for a few weeks now but whenever I return to this, I'll test out your solution and post back.

comment:20 Changed 11 years ago by michaelld (Michael Dickens)

Resolution: worksforme
Status: reopenedclosed

OK. I'm closing this ticket. If, when you try this again, you still have issues with it, reopen this ticket.

comment:21 Changed 11 years ago by MacPorts@…

I had this problem and it went away after I reinstalled as follows on my MacBook Pro:

port install octave-devel +fltk +gcc47

I omitted the +accelerate variant because I got a warning earlier that there are crashes associated with that.

comment:22 Changed 11 years ago by MacPorts@…

Cc: MacPorts@… added

Cc Me!

Note: See TracTickets for help on using tickets.