wxMaxima port

Ryan Schmidt ryandesign at macports.org
Sat Oct 20 14:13:59 PDT 2007


John, my apologies in advance for what I've written below... upon  
rereading it I think it comes across a little brusque... please  
forgive this and hopefully the information will prove helpful.

On Oct 20, 2007, at 11:57, John Doner wrote:

> On 10/18/07, Ryan Schmidt wrote:
>
>> On Oct 19, 2007, at 00:07, John Doner wrote:
>>
>> > Ok, I followed the suggestion to move /usr/local out of the way.
>> > Then I repeated my command to port install wxmaxima.  This seemed
>> > to work, in that it finished without any disastrous error.
>> > However, when I ran wxmaxima,
>> > the window reported that it couldn't connect to maxima.  So I
>> > restored /usr/local as it had been (there's a maxima at /usr/local/
>> > bin/maxima), set the wxmaxima preference so it could find it, and
>> > then wxmaxima worked.  Sort of---there were lots of "STYLE-
>> > WARNING"s, which didn't seem to make much difference to the  
>> program.
>> >
>> > Ok, I guess the problem is solved.  But this all leaves me with the
>> > question "Why does macports care about what already exists in /usr/
>> > local/?"  After all, its stuff is getting installed under /opt/,
>> > and /opt/ is normally first in the $PATH.  And, why didn't it even
>> > try to install maxima  in the /opt/ tree?  I had to identify the
>> > existing maxima for wxmaxima.
>> >
>> > I would think that, if it's important that maxima be there (it is
>> > in this case), macports ought to look for it and install it only if
>> > such a search fails.
>> >
>> > I don't know how wxmaxima generates its displays.  They look pretty
>> > good.  However, not as good as with imaxima; for example, a formula
>> > that called for larger parentheses came up with some clearly formed
>> > out of two halves. with a break in the middle.  I like the ones
>> > generated by TeX much better.  (Perhaps this has something to do
>> > with all those STYLE-WARNINGs I was getting.)
>> >
>> > Now I'll give the transcripts of what happened.
>> >
>> > ------------------------------------------------------------
>> >
>> > john-doners-computer:~ doner$ sudo mv /usr/local /usr/local-off
>> > Password:
>> > john-doners-computer:~ doner$ sudo port install wxmaxima
>> > --->  Fetching jpeg
>> > --->  Attempting to fetch jpegsrc.v6b.tar.gz from http://
>> > www.ijg.org/files
>> > --->  Attempting to fetch droppatch.tar.gz from http://sylvana.net/
>> > jpegcrop/
>> > --->  Verifying checksum(s) for jpeg
>> > --->  Extracting jpeg
>> > --->  Applying patches to jpeg
>> > --->  Configuring jpeg
>> > --->  Building jpeg with target all
>> > --->  Staging jpeg into destroot
>> > --->  Installing jpeg 6b_2
>> > --->  Activating jpeg 6b_2
>> > --->  Cleaning jpeg
>> > --->  Fetching libmikmod
>> > --->  Attempting to fetch libmikmod-3.2.0-beta2.tar.gz from http://
>> > mikmod.raphnet.net/files/
>> > --->  Verifying checksum(s) for libmikmod
>> > --->  Extracting libmikmod
>> > --->  Configuring libmikmod
>> > --->  Building libmikmod with target all
>> > --->  Staging libmikmod into destroot
>> > --->  Installing libmikmod 3.2.0-beta2_0
>> > --->  Activating libmikmod 3.2.0-beta2_0
>> > --->  Cleaning libmikmod
>> > --->  Fetching libogg
>> > --->  Attempting to fetch libogg-1.1.3.tar.gz from http://
>> > downloads.xiph.org/releases /ogg/
>> > --->  Verifying checksum(s) for libogg
>> > --->  Extracting libogg
>> > --->  Configuring libogg
>> > --->  Building libogg with target all
>> > --->  Staging libogg into destroot
>> > --->  Installing libogg 1.1.3_0
>> > --->  Activating libogg 1.1.3_0
>> > --->  Cleaning libogg
>> > --->  Fetching libvorbis
>> > --->  Attempting to fetch libvorbis-1.1.2.tar.gz from http://
>> > downloads.xiph.org/releases/vorbis/
>> > --->  Verifying checksum(s) for libvorbis
>> > --->  Extracting libvorbis
>> > --->  Configuring libvorbis
>> > --->  Building libvorbis with target all
>> > --->  Staging libvorbis into destroot
>> > --->  Installing libvorbis 1.1.2_0
>> > --->  Activating libvorbis 1.1.2_0
>> > --->  Cleaning libvorbis
>> > --->  Fetching smpeg
>> > --->  Attempting to fetch smpeg-0.4.4.tar.gz from ftp://
>> > ftp.lokigames.com/pub/open-source/smpeg/
>> > --->  Attempting to fetch smpeg-0.4.4.tar.gz from ftp://
>> > ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/
>> > --->  Attempting to fetch ltconfig13 from http://svn.macports.org/
>> > repository/macports/distfiles/mww
>> > --->  Attempting to fetch ltmain13 from http://svn.macports.org/
>> > repository/macports/distfiles /mww
>> > --->  Verifying checksum(s) for smpeg
>> > --->  Extracting smpeg
>> > --->  Applying patches to smpeg
>> > --->  Configuring smpeg
>> > --->  Building smpeg with target all
>> > --->  Staging smpeg into destroot
>> > --->  Installing smpeg 0.4.4_6+darwin_8
>> > --->  Activating smpeg 0.4.4_6+darwin_8
>> > --->  Cleaning smpeg
>> > --->  Fetching libsdl_mixer
>> > --->  Attempting to fetch SDL_mixer- 1.2.7.tar.gz from http://
>> > www.libsdl.org/projects/SDL_mixer/release/
>> > --->  Attempting to fetch SDL_mixer- 1.2.7.tar.gz from http://
>> > svn.macports.org/repository/macports/distfiles/libsdl_mixer
>> > --->  Attempting to fetch SDL_mixer-1.2.7.tar.gz from http://
>> > svn.macports.org/repository /macports/distfiles/general/
>> > --->  Attempting to fetch SDL_mixer-1.2.7.tar.gz from http://
>> > svn.macports.org/repository/macports/downloads/libsdl_mixer
>> > Error: Target org.macports.fetch returned: fetch failed
>> > Error: The following dependencies failed to build: wxWidgets
>> > libsdl_mixer tiff
>> > Error: Status 1 encountered during processing.
>> >
>> > ------------------------------------------------------------
>> >
>> > Ok, I thought maybe it just had some communication difficulties.
>> > So after a while, I tried it again:
>> >
>> > ------------------------------ ------------------------------
>> >
>> > john-doners-computer:~ doner$ sudo port install wxmaxima
>> > Password:
>> > --->  Fetching libsdl_mixer
>> > --->  Attempting to fetch SDL_mixer- 1.2.7.tar.gz from http://
>> > www.libsdl.org/projects/SDL_mixer/release/
>> > --->  Verifying checksum(s) for libsdl_mixer
>> > --->  Extracting libsdl_mixer
>> > --->  Configuring libsdl_mixer
>> > --->  Building libsdl_mixer with target all
>> > --->  Staging libsdl_mixer into destroot
>> > --->  Installing libsdl_mixer 1.2.7_0+darwin_8
>> > --->  Activating libsdl_mixer 1.2.7_0+darwin_8
>> > --->  Cleaning libsdl_mixer
>> > --->  Fetching tiff
>> > --->  Attempting to fetch tiff-3.8.2.tar.gz from ftp://
>> > ftp.remotesensing.org/pub/libtiff/
>> > --->  Verifying checksum(s) for tiff
>> > --->  Extracting tiff
>> > --->  Configuring tiff
>> > --->  Building tiff with target all
>> > --->  Staging tiff into destroot
>> > --->  Installing tiff 3.8.2_0+darwin_8
>> > --->  Activating tiff 3.8.2_0+darwin_8
>> > --->  Cleaning tiff
>> > --->  Fetching wxWidgets
>> > --->  Attempting to fetch wxWidgets-2.8.4.tar.bz2 from http://
>> > downloads.sourceforge.net/wxwindows
>> > --->  Verifying checksum(s) for wxWidgets
>> > --->  Extracting wxWidgets
>> > --->  Applying patches to wxWidgets
>> > --->  Configuring wxWidgets
>> > --->  Building wxWidgets
>> > --->  Staging wxWidgets into destroot
>> > --->  Installing wxWidgets 2.8.4_2+darwin_8
>> > --->  Activating wxWidgets 2.8.4_2+darwin_8
>> > --->  Cleaning wxWidgets
>> > --->  Fetching wxMaxima
>> > --->  Attempting to fetch wxMaxima-0.7.2.tar.gz from http://
>> > downloads.sourceforge.net/wxmaxima
>> > --->  Verifying checksum(s) for wxMaxima
>> > --->  Extracting wxMaxima
>> > --->  Applying patches to wxMaxima
>> > --->  Configuring wxMaxima
>> > --->  Building wxMaxima with target all wxMaxima.app
>> > --->  Staging wxMaxima into destroot
>> > --->  Installing wxMaxima 0.7.2_3
>> > --->  Activating wxMaxima 0.7.2_3
>> > --->  Cleaning wxMaxima
>> >
>> > ------------------------------------------------------------
>> >
>> > Never tried to install maxima this time.  So as I said, when I ran
>> > wxmaxima, I had to locate the previously installed program for it,
>> > after restoring /usr/local/.
>> >
>> > Finally, here's a sampling of the error messages I was getting from
>> > wxmaxima (line breaks and formulas didn't copy):
>> >
>> > ------------------------------------------------------------
>> >
>> > $$; in: LAMBDA NIL;     LET*; ; caught STYLE-WARNING:;   The
>> > variable $DRAW\_PIPES is defined but never used.; ; caught STYLE-
>> > WARNING:;   The variable PREAMBLE is defined but never used.; in:
>> > LAMBDA NIL;     LET*; ; caught STYLE-WARNING:;   The variable $DRAW
>> > \_PIPES is defined but never used.; ; caught STYLE-WARNING:;   The
>> > variable PREAMBLE is defined but never used.; in: LAMBDA NIL;
>> > FUNCTION; ; caught STYLE-WARNING:;   undefined function: $DRAW; ;
>> > caught STYLE-WARNING:;   undefined function: $DRAW; ; caught STYLE-
>> > WARNING:;   undefined function: $IMPLICIT\_PLOT; ; caught STYLE-
>> > WARNING:;   These functions are undefined:;     $DRAW $IMPLICIT
>> > \_PLOT; ; compilation unit finished;   caught 8 STYLE-WARNING
>> > conditions$$
>> >
>> > ------------------------------------------------------------
>>
>>
>> MacPorts is designed to use its own libraries, not any other software
>> you may have installed elsewhere. Reasons for this are in the FAQ:
>>
>> http://trac.macosforge.org/projects/macports/wiki/
>> FAQ#WhyisMacPortsusingitsownlibraries
>>
>> However, compilers automatically try to link to software in /usr/
>> local. We have not yet found the right way to prevent this, and it
>> causes issues, because MacPorts likes to be in control of everything,
>> and it is not in control of /usr/local. So the solution is to not
>> have anything in /usr/local.
>>
>> What was the error you received when you tried to use this software
>> while /usr/local was renamed to something else? Or are you saying
>> that not all the requisite software was installed? If so, what port
>> was not installed that should have been? Does it then work if you
>> manually install that port? Or are you saying a portfile is not
>> existent for the software you need? If so, what is the software, its
>> homepage, etc?
>
> The transcript I included is complete and includes the answer to  
> your question.
> Originally, I had simply done    sudo port install wxmaxima   and  
> the installation
> failed, complaining about /usr/local/bin/maxima already there when  
> it tried to
> install the dependency maxima.

I don't see this part in your transcript. Would have liked to see the  
specific complaint issued.

> Then I followed your suggestion to move
> /usr/local out of the way, as /usr/local-off.  I assumed that  
> simply repeating
> the command   sudo port install wxmaxima   would cause it to  
> restart the
> installation process, discover the dependencies that were already  
> filled, and
> then pick up where it had left off (trying to install maxima).

Yes, that is what should have happened. MacPorts should have picked  
up where it left off.

> But this isn't what
> happened; it did discover already installed items, but then it  
> began installing
> other things, never actually getting back to maxima.  The result  
> was a successfully
> installed wxmaxima, but without the critical part, maxima itself.

Very odd. The wxMaxima port does declare a (runtime) dependency on  
the maxima port. What does "port installed maxima" say now? If it  
says it's not installed, try installing it.

$ sudo port clean --work maxima
$ sudo port install maxima

If it says it's installed, try uninstalling it, then reinstalling it.

$ sudo port -f uninstall maxima
$ sudo port clean --work maxima
$ sudo port install maxima

> At this point, I restored /usr/local and used the Preference in  
> wxmaxima to locate
> the maxima it needed at /usr/local/bin/maxima.  This worked,  
> although I got all
> those STYLE errors I mentioned.

Yeah, now we're back into having things in /usr/local which I don't  
recommend so I'm not going to deal with those errors. I'll deal with  
helping you get the MacPorts maxima port installed.

> Now I'm disturbed about macports failure to pick up where it left  
> off; it was as though
> it just decided to omit the dependency maxima.  Not necessarily  
> bad, but it should
> certainly issue a message to say the dependency is not fulfilled,  
> and what might be
> done to deal with it.

It should have picked up where it left off. Maybe the port got  
configured and partially made at the point where you originally  
received an error, and it had found things in /usr/local, and then  
you moved /usr/local out of the way and told MacPorts to continue,  
and it did, without reconfiguring the port, so it got confused? That  
doesn't quite make sense to me... but if that were the case, cleaning  
the work area of the erroring port before proceeding should have  
taken care of it, which is why I recommend cleaning before installing  
above.

maxima is declared as a runtime dependency of wxMaxima. I'm not  
entirely clear on how MacPorts handles a runtime dependency  
differently from a library dependency. Maybe this is relevant somehow.

> I read the FAQ as you suggested, and I can understand why it  
> doesn't want to put or
> use things in /usr/local.  But I still don't understand why it  
> should even care what is
> in /usr/local.  /opt comes first in the path.  Won't macports and  
> macports installed
> programs look for everything they need in the /opt tree?  That  
> appears to be the
> intent, and if so, why should it even matter what might or might  
> not exist elsewhere?

The gcc compiler automatically looks for libraries (and maybe  
binaries, I'm not sure) in /usr/local regardless of your path. Some  
suggestions have been made about how to stop gcc from doing this but  
for one reason or another these have been unsatisfactory and nothing  
has been implemented in MacPorts yet. Therefore, please do not have  
anything in /usr/local, else it will probably get picked up by some  
port you're trying to build, and you will probably run into problems.  
So many problems reported on the list have been traced back to rogue  
software in /usr/local that were resolved by moving /usr/local aside  
that I'm no longer interested in helping anyone who insists on having  
software in /usr/local while trying to use MacPorts. Putting hand- 
built software in any other prefix (other than /usr/local and /opt/ 
local) should be ok, as should /usr/local/<anything>.

wxMaxima installed fine for me on 10.4.10, Xcode 2.4.1, MacPorts  
trunk (r30016), Intel Core 2 Duo, and maxima did get installed:

$ sudo port install wxMaxima
Password:
--->  Fetching sbcl
--->  Attempting to fetch sbcl-1.0.10-source.tar.bz2 from http:// 
downloads.sourceforge.net/sbcl
--->  Attempting to fetch sbcl-0.9.16-x86-darwin-binary.tar.bz2 from  
http://downloads.sourceforge.net/sbcl
--->  Verifying checksum(s) for sbcl
--->  Extracting sbcl
--->  Applying patches to sbcl
--->  Configuring sbcl
--->  Building sbcl with target all
--->  Staging sbcl into destroot
--->  Installing sbcl 1.0.10_0+test
--->  Activating sbcl 1.0.10_0+test
--->  Cleaning sbcl
--->  Fetching maxima
--->  Attempting to fetch maxima-5.13.0.tar.gz from http:// 
downloads.sourceforge.net/maxima
--->  Verifying checksum(s) for maxima
--->  Extracting maxima
--->  Configuring maxima
--->  Building maxima with target all
--->  Staging maxima into destroot
--->  Installing maxima 5.13.0_0+test
--->  Activating maxima 5.13.0_0+test
--->  Cleaning maxima
--->  Fetching wxWidgets
--->  Verifying checksum(s) for wxWidgets
--->  Extracting wxWidgets
--->  Applying patches to wxWidgets
--->  Configuring wxWidgets
--->  Building wxWidgets
--->  Staging wxWidgets into destroot
--->  Installing wxWidgets 2.8.6_1+darwin_8
--->  Activating wxWidgets 2.8.6_1+darwin_8
--->  Cleaning wxWidgets
--->  Fetching wxMaxima
--->  Attempting to fetch wxMaxima-0.7.3a.tar.gz from http:// 
downloads.sourceforge.net/wxmaxima
--->  Verifying checksum(s) for wxMaxima
--->  Extracting wxMaxima
--->  Applying patches to wxMaxima
--->  Configuring wxMaxima
--->  Building wxMaxima with target all wxMaxima.app
--->  Staging wxMaxima into destroot
--->  Installing wxMaxima 0.7.3a_0
--->  Activating wxMaxima 0.7.3a_0
--->  Cleaning wxMaxima
$

(Other dependencies not listed because I already had them installed.)

wxMaxima.app opened for me and showed me a window. Didn't test  
further because I don't know how to use the software.




More information about the macports-users mailing list