Bug 75372 - app-sci - ebuild for axiom-3.0beta
Bug#: 75372 Product:  Gentoo Linux Version: unspecified Platform: x86
OS/Version: Linux Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: plasmaroo@gentoo.org Reported By: smustudent1@yahoo.com
Component: Ebuilds
URL: 
Summary: app-sci - ebuild for axiom-3.0beta
Keywords:  
Status Whiteboard: 
Opened: 2004-12-22 14:38 0000
Description:   Opened: 2004-12-22 14:38 0000
This is a (rather basic) ebuild for the beta release of axiom.  Testers be
warned this is a long compile.

Reproducible: Always
Steps to Reproduce:

------- Comment #1 From Cliff Yapp 2004-12-22 14:39:17 0000 -------
Created an attachment (id=46665) [details]
Ebuild for the Axiom computer algebra system

------- Comment #2 From Cliff Yapp 2004-12-22 14:40:20 0000 -------
Created an attachment (id=46666) [details]
Patch for internal gcl build settings

------- Comment #3 From Cliff Yapp 2004-12-22 15:08:03 0000 -------
Created an attachment (id=46667) [details]
Opps - I guess that's 3.0 beta, not 1.0

------- Comment #4 From Cliff Yapp 2004-12-22 15:08:56 0000 -------
Created an attachment (id=46668) [details]
Path for gcl settings - 3.0, not 1.0

------- Comment #5 From Cliff Yapp 2004-12-22 15:09:46 0000 -------
Duh - I guess I should read the final release notes.  That's 3.0beta.

------- Comment #6 From Tim Yamin (RETIRED) 2005-01-16 06:17:28 0000 -------
RDEPEND="${DEPEND}"

^^ That's done by default and against policy...

------- Comment #7 From Tim Yamin (RETIRED) 2005-01-16 08:43:03 0000 -------
Ok, I've added axiom-9999 which I wrote to CVS in sci-mathematics. If you want
to give that a go and confirm it works, that would be very helpful; and if you
could base your 3.0_pre20050101 version off it that would also be very
helpful... Thanks!

------- Comment #8 From Cliff Yapp 2005-01-17 05:44:15 0000 -------
Heh. Apologies for posting a not-ready-for-prime-time ebuild.  Your cvs ebuild
is very impressive!  I've started an emerge - I'll let you know how it goes. 
It gave an initial sandbox error but I don't know if it matters:

--------------------------- ACCESS VIOLATION SUMMARY
---------------------------
LOG FILE = "/tmp/sandbox-sci-mathematics_-_axiom-9999-15438.log"

mkdir:     /root/.ssh
--------------------------------------------------------------------------------

I think this is just me needing to create a .ssh directory for the root
account?

They've either added or are about to add a new make target for gentoo to avoid
the need for the patch.  I think it's already in the main GNU-arch archive, but
it's in cvs yet.  Once it is the patch won't be needed - instead of
path/mnt/linux the target becomes path/mnt/gentoo

There's no point in a 20050101 ebuild - there will be a new, much better
release out around the beginning of Feb.  (Graphics, old hypertext browser,
etc.)  They're planning to do a release each month.  I'm not sure which one
is/will be "3.0" proper, but I'll try to find out.

------- Comment #9 From Tim Yamin (RETIRED) 2005-01-17 08:19:11 0000 -------
Yeah, I know about the montly releases but thought that it would be better to
have a snapshot that's guaranteed to build in Portage rather than the current
CVS ebuild which has working sman but may break at any moment (HyperText is
still to come, I guess, at least it's not here yet as of when I built it here
yesterday).

The violation summary: not sure where that's coming from... Since it has the
name sci-mathematics in it seems that it's probably caused by a Portage bug of
some sort, hrm.

------- Comment #10 From Cliff Yapp 2005-01-17 12:24:43 0000 -------
The sandbox error seemed to go away once I made a /root/.ssh directory.  That's
the first cvs ebuild I've run - could it be that cvs ebuilds need root to be
set up for secure shell stuff?

cvs is actually relatively stable in the axiom development scheme of things -
real bleeding edge development is done using the GNU arch system, and when
things hit a reasonable point they are uploaded to savannah via cvs.  I have
built an arch version that has HyperText, but IIRC there were some odd issues
about non-standard install locations or some such.  As I understand it the next
"stable" tarball release should hopefully include graphics and HyperText, so I
figured that would be a better "launch point" for Axiom on gentoo.  (Which is
why I started in on the BRL-CAD ebuild as opposed to fixing this one ;-)

So for naming of axiom ebuilds in portage, would you rather work on a date
system (e.g. 3.0-20050212) than 3.x.y (or whatever winds up being used?)  I
suppose it really doesn't matter much - dates can be switched over to 3.x.y if
they start assigning such numbers, provided the upgrade order doesn't get
confused.

Just curious - can the cvs ebuild system work with tla (i.e. GNU arch)
repositories?

------- Comment #11 From Cliff Yapp 2005-01-17 14:15:48 0000 -------
Hmm - cvs build failed with the following:

gcc -march=athlon-xp -O3 -pipe -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/var/tmp/portage/axiom-9999/work/axiom/lsp/gcl-2.6.5/o -I../h -I../gcl-tk @XINCLUDES@  -c  sockets.c
gcc: @XINCLUDES@: No such file or directory
make[4]: *** [sockets.o] Error 1
make[4]: Leaving directory `/var/tmp/portage/axiom-9999/work/axiom/lsp/gcl-2.6.5/o'
make[3]: *** [unixport/saved_pre_gcl] Error 2
make[3]: Leaving directory `/var/tmp/portage/axiom-9999/work/axiom/lsp/gcl-2.6.5'
/bin/sh: unixport/saved_gcl: No such file or directory
make[2]: *** [gcldir] Error 127
make[2]: Leaving directory `/var/tmp/portage/axiom-9999/work/axiom/lsp'
make[1]: *** [lspdir] Error 2
make[1]: Leaving directory `/var/tmp/portage/axiom-9999/work/axiom'
make: *** [all] Error 2

!!! ERROR: sci-mathematics/axiom-9999 failed.
!!! Function src_compile, Line 76, Exitcode 2

------- Comment #12 From Tim Yamin (RETIRED) 2005-01-17 16:09:10 0000 -------
> That's the first cvs ebuild I've run - could it be that cvs ebuilds need root to be set up for secure shell stuff?

Yes, Savannah uses CVS authentication; that explains it :-]

> So for naming of axiom ebuilds in portage, would you rather work on a date system (e.g. 3.0-20050212) than 3.x.y (or whatever winds up being used?)

Dates better until they sort their system out, I think.

> Just curious - can the cvs ebuild system work with tla (i.e. GNU arch) repositories?

Don't think so, I don't think we have an etla eclass yet ;-)

> #BuildFailure

When it runs configure for gcl, what does it dump for TK_XINCLUDES? I get the
following:

{ ... }
TK_XINCLUDES=-I/usr/X11R6/include
TK_INCLUDE=-I/usr/lib/../include
TCL_INCLUDE=-I/usr/lib/../include
{ ... }

... and ...

gcc -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer 
-I/tmp/gcl-2.6.5/o -I../h -I../gcl-tk -I/usr/X11R6/include  -c  sockets.c

... is Tcl and Tk installed?

------- Comment #13 From Cliff Yapp 2005-01-17 18:54:55 0000 -------
I should have TCL/TK installed.  Complete TCL/TK section below.

What version of portage are you working with?  I just upgraded to the very latest this morning.  portage-2.0.51-r13

Do I need to re-emerge something else to update it, perhaps?

# numerous TCL/TK variables culled from the tkConfig.sh and tclConfig.sh
# if these are found.
TK_CONFIG_PREFIX=/usr/lib
TK_LIBRARY=/usr/lib/tk8.4
TCL_LIBRARY=/usr/lib/tcl8.4
TK_XINCLUDES=@XINCLUDES@
TK_INCLUDE=-I/usr/lib/../include
TCL_INCLUDE=-I/usr/lib/../include
TK_LIB_SPEC=@TK_LIB_SPEC@
TK_BUILD_LIB_SPEC=@TK_BUILD_LIB_SPEC@
TK_XLIBSW=@XLIBSW@
TK_XINCLUDES=@XINCLUDES@
TCL_LIB_SPEC=
TCL_DL_LIBS=
TCL_LIBS=-ldl -lm

------- Comment #14 From Tim Yamin (RETIRED) 2005-01-22 14:01:46 0000 -------
> I should have TCL/TK installed.

Strange, it seems like there's something wrong with a pkgconfig script further up the ladder.

Using 8.4.6 TCL and TK here, they work fine if that's of any help.

------- Comment #15 From M. Edward Borasky 2005-04-10 11:00:23 0000 -------
I just installed axiom on my 1.3 GHz Athlon T-bird from Portage. I forgot to
time the build, but it appears to have been flawless and I am starting to test
the application. If there's a built-in test suite, I'm planning to run it.
Meanwhile, thanks to the good folks at Gentoo for packaging this. I actually
worked at IBM when this package's predecessor, Scratchpad, was a gleam in
someone's eye. :)

------- Comment #16 From M. Edward Borasky 2005-04-10 11:18:12 0000 -------
Well, it *built* flawlessly but it refuses to execute:

bash-2.05b$ /opt/axiom/bin/axiom
The directory for Axiom, /var/tmp/portage/axiom-9999/work/axiom/mnt/linux, doesnot exist.
Goodbye.
bash-2.05b$

I took a look at the ebuild; you probably need to copy over ".../work/axiom/mnt/linux" into the "/opt" tree for this to work, and change the variable in the shell script. /opt/axiom/bin/axiom says,

#!/bin/sh
AXIOM=/var/tmp/portage/axiom-9999/work/axiom/mnt/linux
#!/bin/sh

That needs to change to whereever you put the "/axiom/mnt" tree. In the ebuild, you have

src_install() {
    src_setenv

    dodir /usr/bin
    einstall INSTALL=${D}/opt/axiom COMMAND=${D}/usr/bin/axiom || die 'Failed to install Axiom!'
    sed -e '1d;2i AXIOM=/opt/axiom' -i ${D}/usr/bin/axiom || die 'Failed to patch axiom runscript!'

    # Get rid of /mnt/linux
    cd ${D}/opt/axiom
    mv mnt/linux/* .
    rm -rf mnt

    sed -e 's/AXIOMsys/sman/g' ${D}/usr/bin/axiom > ${D}/usr/bin/sman
    sed -e 's:$AXIOM/bin/clef -e ::g' ${D}/usr/bin/axiom > ${D}/usr/bin/AXIOMsys
    chmod +x ${D}/usr/bin/sman
    chmod +x ${D}/usr/bin/AXIOMsys
}

It looks like that didn't happen -- the work directory is gone but it didn't get moved. It doesn't seem to be anywhere at all:

DreamGate root # slocate -u
DreamGate root # locate /mnt/linux
DreamGate root #     

This should be easy to fix, but I'm not sure how it's broken. I think for now I'll comment out the "rm" in the ebuild and run the emerge again just to see what happens.

------- Comment #17 From M. Edward Borasky 2005-04-10 11:26:23 0000 -------
A little more evidence: apparently the "mv" failed but other stuff worked.

bash-2.05b$ axiom
/bin/sh: line 1: /lib/session: No such file or directory
/bin/sh: line 1: exec: /lib/session: cannot execute: No such file or directory
/bin/sh: line 1: /bin/clef: No such file or directory
/bin/sh: line 1: exec: /bin/clef: cannot execute: No such file or directory
/bin/sh: line 1: /bin/hypertex: No such file or directory
/bin/sh: line 1: exec: /bin/hypertex: cannot execute: No such file or directory
/bin/sh: line 1: /lib/viewman: No such file or directory
/bin/sh: line 1: exec: /lib/viewman: cannot execute: No such file or directory
                        AXIOM Computer Algebra System
                       Version: Axiom 3.4 (April 2005)
               Timestamp: Saturday April 9, 2005 at 23:07:13
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave AXIOM and return to shell.
-----------------------------------------------------------------------------


Error: Cannot open the file /var/tmp/portage/axiom-9999/work/axiom/mnt/linux/algebra/compress.daase.
Fast links are on: do (si::use-fast-links nil) for debugging
Error signalled by SYSTEM:TOP-LEVEL.
Broken at APPLY.  Type :H for Help.
BOOT>>bash-2.05b$

So ... I guess I'll wait till someone who knows the ebuild comes up with a fix. It looks like there's more missing than just "mnt/linux".

------- Comment #18 From mark@tvk.rwth-aachen.de 2005-07-06 04:29:54 0000 -------
Emerging axiom produces this error at the beginning: 
 
-------------- 
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) 
kpathsea: Running mktexfmt latex.fmt 
tcfmgr: config file `tcfmgr.map' (usually in $TEXMFMAIN/texconfig) not found. 
fmtutil: config file `fmtutil.cnf' not found. 
I can't find the format file `latex.fmt'! 
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) 
kpathsea: Running mktexfmt latex.fmt 
tcfmgr: config file `tcfmgr.map' (usually in $TEXMFMAIN/texconfig) not found. 
fmtutil: config file `fmtutil.cnf' not found. 
I can't find the format file `latex.fmt'! 
cp: cannot stat stat „Makefile.dvi“: File not found 
make: *** [all] Error 1 
-------------- 

------- Comment #19 From mark@tvk.rwth-aachen.de 2005-07-06 04:44:11 0000 -------
to my error above: 
I commented these lines out: 
----------- 
export VARTEXFONTS=${WORKDIR}/../temp 
export TEXMF="{${VARTEXFONTS},!!/usr/share/texmf}" 
----------- 
and now it compiles. 

------- Comment #20 From mark@tvk.rwth-aachen.de 2005-07-06 09:41:13 0000 -------
It compiled fine now, but I cannot start it: 
------------ 
The directory for 
Axiom, /var/tmp/portage/axiom-9999/image//opt/axiom/mnt/linux, does not exist. 
Goodbye. 
------------ 
 
How to solve this? Setting $AXIOM doesn't change anything, this path seems to 
be hardcoded. 

------- Comment #21 From mark@tvk.rwth-aachen.de 2005-07-14 02:48:21 0000 -------
Solved that problem. Edit/opt/axiom/bin/axiom and change the head of the file  
from  
-------------------------------- 
#!/bin/sh  
AXIOM=/var/tmp/portage/axiom-9999/image//opt/axiom/mnt/linux 
-------------------------------- 
 
to 
 
-------------------------------- 
#!/bin/sh  
AXIOM=/opt/axiom 
-------------------------------- 
 
Further, the header from /usr/bin/axiom is wrong: 
-------------------------------- 
AXIOM=/opt/axiom 
AXIOM=/var/tmp/portage/axiom-9999/image//opt/axiom/mnt/linux 
export AXIOM 
PATH=${AXIOM}/bin:${PATH} 
export PATH 
#!/bin/sh 
-------------------------------- 
 
Change it to 
-------------------------------- 
#!/bin/sh 
AXIOM=/opt/axiom 
export AXIOM 
PATH=${AXIOM}/bin:${PATH} 
export PATH 
-------------------------------- 
 
Now it works! 

------- Comment #22 From M. Edward Borasky 2005-08-25 19:17:46 0000 -------
(In reply to comment #16)
> Well, it *built* flawlessly but it refuses to execute:
> 
> bash-2.05b$ /opt/axiom/bin/axiom
> The directory for Axiom, /var/tmp/portage/axiom-9999/work/axiom/mnt/linux,
doesnot exist.
> Goodbye.
> bash-2.05b$

This is still here as of today (2005-08-25). I downloaded Axiom directly from
the Savannah CVS repository and it built and executed with no problems
whatsover, so I'm pretty sure it's an ebuild issue.

Meanwhile, if you haven't visited the Axiom site recently, it's greatly
improved. It's sort of like a Wiki/Forum now and includes some more information.
Axiom now builds with GCL 2.6.6, I think.

------- Comment #23 From mark@tvk.rwth-aachen.de 2005-11-21 04:35:59 0000 -------
Could someone apply the fixes from comment #19 and maybe from #21 too, please? 
At least commenting out the two lines (-> #19) is trivial and ensures that 
axiom is being built, while #21 has to be done afterwards (you could add an 
einfo-line to this bugzilla-page or you can print the needed changes directly, 
if you don't want to patch the ebuild for this) 
 
btw: axiom doesn't compile "*HOURS*", it compiles only two hours with 
aggressive cflags on a Celeron M 1500, 512MB Ram. Openoffice compiles 
"*HOURS*". Maybe this comment should be changed ;-) 

------- Comment #24 From Tim Yamin (RETIRED) 2005-12-04 13:42:43 0000 -------
*** Bug 111923 has been marked as a duplicate of this bug. ***

------- Comment #25 From Tim Yamin (RETIRED) 2005-12-04 13:44:03 0000 -------
Fixes suggested here added to portage CVS for the axiom CVS ebuild as well as a
gcl fix I've now sent upstream. Please reopen this bug if there are any
problems. Thanks!