Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
macaulay2 [2007/10/25 06:06] – créée gerard | macaulay2 [2017/08/25 09:56] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | Macaulay2 | ||
+ | |||
+ | <note important> | ||
+ | ====== 1.4 sur octopus ====== | ||
+ | < | ||
+ | rpm -ivh Macaulay2-1.4-1.common.rpm | ||
+ | rpm -ivh Macaulay2-1.4-1.x86_64-Linux-ScientificLinux-5.5.rpm | ||
+ | </ | ||
+ | |||
+ | Vérification simple: | ||
+ | < | ||
+ | [henry@octopus ~]$ M2 | ||
+ | Macaulay2, version 1.4 | ||
+ | with packages: ConwayPolynomials, | ||
+ | | ||
+ | |||
+ | i1 : 2+2 | ||
+ | |||
+ | o1 = 4 | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== installation des binaires ====== | ||
+ | * sur calypso et t2000 | ||
+ | * [[http:// | ||
+ | * Utilisation: | ||
+ | |||
+ | |||
+ | ===== shrek ===== | ||
+ | < | ||
+ | shrek:~# dpkg -i Macaulay2-0.9.95-i386-Linux.deb | ||
+ | Selecting previously deselected package macaulay2. | ||
+ | (Reading database ... 22381 files and directories currently installed.) | ||
+ | Unpacking macaulay2 (from Macaulay2-0.9.95-i386-Linux.deb) ... | ||
+ | Setting up macaulay2 (0.9.95) ... | ||
+ | Macaulay 2, version 0.9.95 | ||
+ | with packages: Classic, Core, Elimination, | ||
+ | | ||
+ | --dumping to / | ||
+ | --success | ||
+ | --moving: / | ||
+ | |||
+ | </ | ||
+ | |||
+ | ====== compilation version stable ====== | ||
+ | |||
+ | |||
* [[http:// | * [[http:// | ||
* compilé sur nemo, version 0.9.95 | * compilé sur nemo, version 0.9.95 | ||
* en 32 bits pour commencer | * en 32 bits pour commencer | ||
+ | * options de compilation, | ||
+ | * blas et lapack font partie de la Sun Perf Lib (--with-lapacklibs=" | ||
Les librairies nécessaires | Les librairies nécessaires | ||
Ligne 12: | Ligne 61: | ||
| ntl or Singular-ntl | ntl-5.4.1.tar.gz | / | | ntl or Singular-ntl | ntl-5.4.1.tar.gz | / | ||
+ | ====== compilation version stable (tout est recompilé) ====== | ||
+ | * version 0.9.95 | ||
+ | * en 32 bits | ||
+ | * options de compilation, | ||
+ | * blas et lapack font partie de la Sun Perf Lib (--with-lapacklibs=" | ||
+ | |||
+ | Les librairies nécessaires | ||
+ | ^ nom ^ archive | ||
+ | | Singular-Factory | factory-3-0-2.tar.gz | / | ||
+ | | Singular-Libfac | libfac-3-0-2.tar.gz | / | ||
+ | | gmp | 4.2.2 | / | ||
+ | | gc | gc-7.0.tar.gz | / | ||
+ | | gdbm | 1.8.3 | / | ||
+ | | readline | 5.2 | / | ||
+ | | ncurses | 5.6 | / | ||
+ | | ntl or Singular-ntl | ntl-5.4.1.tar.gz | / | ||
+ | |||
+ | La compilation échoue: | ||
+ | < | ||
+ | ../c/scc1 -dep -J. ../ | ||
+ | ../ | ||
+ | ../ | ||
+ | make[2]: *** [C.dep] Error 1 | ||
+ | make[2]: Leaving directory `/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====== version svn ====== | ||
+ | < | ||
+ | nemo-dgrayson% svn co svn:// | ||
+ | ... | ||
+ | Checked out revision 5981. | ||
+ | nemo-dgrayson% cd M2 | ||
+ | / | ||
+ | nemo-dgrayson% make | ||
+ | + autoconf | ||
+ | + rm -f include/ | ||
+ | autoheader | ||
+ | touch " | ||
+ | --: The configure script in this directory has been prepared. | ||
+ | --: To configure and build Macaulay 2: | ||
+ | --: | ||
+ | mkdir BUILD/ | ||
+ | cd BUILD/ | ||
+ | | ||
+ | make install | ||
+ | --: | ||
+ | --: To reconfigure and try again: | ||
+ | --: | ||
+ | cd BUILD/ | ||
+ | make reconfigure install | ||
+ | --: | ||
+ | --: To see all the options to " | ||
+ | --: | ||
+ | | ||
+ | --: | ||
+ | |||
+ | </ | ||
+ | |||
+ | 1er problème: ne détecte pas la lib factory: | ||
+ | < | ||
+ | conftest.cpp: | ||
+ | |||
+ | </ | ||
+ | avec le code suivant: | ||
+ | < | ||
+ | #include < | ||
+ | extern const char * libfac_version; | ||
+ | |||
+ | int main () { | ||
+ | extern const char factoryVersion[]; | ||
+ | return SW_USE_NTL; | ||
+ | return *factoryVersion; | ||
+ | return *libfac_version; | ||
+ | |||
+ | </ | ||
+ | mais SW_USE_NTL n'est déclaré nulle part! (grep -r SW_USE_NTL *). On le supprime!\\ | ||
+ | Voir les modifs sur le configure.ac | ||
+ | < | ||
+ | diff ../ | ||
+ | 413c413 | ||
+ | < do eval BUILD_$i=yes | ||
+ | --- | ||
+ | > do eval BUILD_$i=no | ||
+ | 531, | ||
+ | < test $BUILD_blas = yes && BUILTLIBS=" | ||
+ | < test $BUILD_lapack = yes && BUILTLIBS=" | ||
+ | --- | ||
+ | > test $BUILD_blas = yes && BUILTLIBS=" | ||
+ | > test $BUILD_lapack = yes && BUILTLIBS=" | ||
+ | 551a552 | ||
+ | > | ||
+ | 591, | ||
+ | < #for i in $LIBLIST | ||
+ | < #do eval t=\$BUILD_$i | ||
+ | < # test " | ||
+ | < #done | ||
+ | --- | ||
+ | > for i in $LIBLIST | ||
+ | > do eval t=\$BUILD_$i | ||
+ | > test " | ||
+ | > done | ||
+ | </ | ||
+ | et enfin, obligé de relinker /bin/sh sur /bin/bash (au lieu de /sbin/sh) sinon le make échoue immédiatement (grrr!) | ||
+ | |||
+ | Nouvelle erreur: | ||
+ | < | ||
+ | ../ | ||
+ | |||
+ | </ | ||
+ | pourquoi utiliser bzero() au lieu de memset()? [[http:// | ||
+ | On remplace: | ||
+ | < | ||
+ | nemo-henry% cp -rp Macaulay2/ | ||
+ | nemo-henry% diff Macaulay2/ | ||
+ | 7a8,9 | ||
+ | > #define bzero(b, | ||
+ | > | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | et toujours l' | ||
+ | < | ||
+ | ../ | ||
+ | ../ | ||
+ | </ | ||
+ | corrigée par: | ||
+ | < | ||
+ | nemo-henry% diff Macaulay2/ | ||
+ | 56,58d55 | ||
+ | < #if defined(__sun) && defined(__SVR4) | ||
+ | < #undef GS | ||
+ | < #endif | ||
+ | </ | ||
+ | |||
+ | mais finalement, échoue sur: | ||
+ | < | ||
+ | ../c/scc1 -dep -J. ../ | ||
+ | ../ | ||
+ | ../ | ||
+ | make[2]: *** [C.dep] Error 1 | ||
+ | make[2]: Leaving directory `/ | ||
+ | restart: done | ||
+ | make[1]: *** [all] Error 2 | ||
+ | make[1]: Leaving directory `/ | ||
+ | make: *** [all] Error 2 | ||
+ | make: Leaving directory `/ | ||
+ | </ | ||
+ | En utilisant le debugger: | ||
+ | < | ||
+ | nemo-henry% dbx ../c/scc1 | ||
+ | For information about new features see `help changes' | ||
+ | To remove this message, put `dbxenv suppress_startup_message 7.5' in your .dbxrc | ||
+ | Reading scc1 | ||
+ | Reading ld.so.1 | ||
+ | Reading libgc.so.1.0.3 | ||
+ | Reading libm.so.2 | ||
+ | Reading libc.so.1 | ||
+ | Reading libpthread.so.1 | ||
+ | Reading librt.so.1 | ||
+ | Reading libdl.so.1 | ||
+ | Reading libgcc_s.so.1 | ||
+ | Reading libaio.so.1 | ||
+ | Reading libmd5.so.1 | ||
+ | (dbx) list | ||
+ | (dbx) stop at 189 | ||
+ | (2) stop at " | ||
+ | (dbx) run -dep -J. ../ | ||
+ | Running: scc1 -dep -J. ../ | ||
+ | (process id 8680) | ||
+ | t@1 (l@1) signal SEGV (no mapping at the fault address) in GC_SysVGetDataStart at 0xfef766dc | ||
+ | 0xfef766dc: GC_SysVGetDataStart+0x0069: | ||
+ | Current function is newnode1 | ||
+ | | ||
+ | (dbx) where | ||
+ | current thread: t@1 | ||
+ | [1] GC_SysVGetDataStart(0x1000, | ||
+ | [2] GC_register_data_segments(0xfef70d16, | ||
+ | [3] GC_init_inner(0x0, | ||
+ | [4] GC_generic_malloc_many(0x28, | ||
+ | [5] GC_malloc(0x27, | ||
+ | [6] GC_debug_malloc(0x14, | ||
+ | =>[7] newnode1(len = 0, tag = 134509400), line 23 in " | ||
+ | [8] UniqueStringN(s = 0x808288a " | ||
+ | [9] UniqueString(s = 0x808288a " | ||
+ | [10] yyinit(), line 2837 in " | ||
+ | [11] main(argc = 1, argv = 0x80475fc), line 188 in " | ||
+ | |||
+ | </ | ||
+ | |||
+ | ====== Problèmes ====== | ||
+ | ===== compilation de gmp ===== | ||
+ | par défaut, le "make check" échoue pour gmp. | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | ===== compilation de ntl ===== | ||
+ | bien entendu, le configure ne prend pas tout en compte, du coup: | ||
+ | < | ||
+ | ./configure PREFIX=$HOME/ | ||
+ | GMP_PREFIX=$HOME/ | ||
+ | NTL_GMP_LIP=on NTL_STD_CXX=on NTL_NO_INIT_TRANS=on NTL_CXX_ONLY=on \ | ||
+ | CC=c++ \ | ||
+ | CFLAGS=" | ||
+ | LDFLAGS=" | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== compilation de factory ===== | ||
+ | < | ||
+ | LDFLAGS=' | ||
+ | CFLAGS=" | ||
+ | CXXFLAGS=" | ||
+ | LDFLAGS=" | ||
+ | ./configure --prefix=$HOME/ | ||
+ | --enable-NTL \ | ||
+ | --with-gmp=$HOME/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== compilation de macaulay2 ===== | ||
+ | cette erreur: | ||
+ | < | ||
+ | ** compiling ../ | ||
+ | ../ | ||
+ | ../ | ||
+ | make[2]: *** [ntl_interface.o] Error 1 | ||
+ | |||
+ | </ | ||
+ | se résoud de la façon suivante: | ||
+ | < | ||
+ | nemo-henry% cp -rp ../ | ||
+ | nemo-henry% diff ../ | ||
+ | 55a56 | ||
+ | > #undef GS | ||
+ | |||
+ | </ |