Installation Open Cobol, GMP et LibTool

Eul Mulot

Membre actif
12 Juin 2006
822
73
37
Belfort
Salut les gens !

Souhaitant me mettre au cobol sur mac, dans le cadre de mes études, j'ai cherché un peu sur le net, et j'ai trouvé la solution open cobol, déjà citée dans ces pages.

J'ai un problème pendant l'installation de gmp (4.2.1), ./configure, make marchent sans problèmes apparants, pas de messages d'erreurs, mais lorsque que je fais make install, il commence à installer, mais j'obtient le message suivant , avec un problème de droit dans /usr/local/info.

Bloc de code:
Mulot:~/BOULOT/Cobol/gmp-4.2.1 mulot$ make install
make  install-recursive
Making install in tests
Making install in .
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in devel
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in mpn
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in mpz
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in mpq
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in mpf
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in rand
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in misc
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in cxx
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in mpbsd
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in mpn
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in mpz
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in mpq
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in mpf
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in printf
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in scanf
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in cxx
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in mpbsd
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in demos
Making install in calc
make  install-am
make[5]: Nothing to be done for `install-exec-am'.
make[5]: Nothing to be done for `install-data-am'.
Making install in expr
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in tune
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in doc
make[3]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/info" || /Users/mulot/BOULOT/Cobol/gmp-4.2.1/install-sh -d "/usr/local/info"
mkdir: /usr/local/info: Permission denied
make[3]: *** [install-info-am] Error 1
make[2]: *** [install-am] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2

Si quelqu'un pouvait me donner la solution, faut-il que je donne les droits necessaire au dit répertoire, ou y-a-t-il d'autres erreures avant ?

Merci d'avance.
 
Voyant que l'installation a merdé au niveau de la vérification de l'existence du repétoire info dans usr/local, et qu'il ne possedait pas les droits pour le créer, j'ai essayé d'aller le créer moi même, mais même resultat, impossible, je comprend pourtant pas, le répertoire local possede les droits nécessaires pour que je puisse le faire ...

Bloc de code:
drwxr-xr-x     7 root  admin    238 Dec 22 07:49 local

J'ai juste un compte root sur mon mac, aucun autre compte, de quoi cela peut-il venir ?
 
Il faut faire : "sudo make install".
 
Merci beaucoup Bompi !

J'ai une question à propos de LibTool, j'ai trouvé les commandes suivantes pour l'installer.

Bloc de code:
./configure --prefix=/usr &&
make &&
make install
La première commande n'éxécute apparament rien, j'obtient juste le ">" de redirection, que faut- il que j'y rentre ? Je ne vois pas le rapport avec l'option prefix.

Désolé pour ces questions, mais c'est tout neuf pour moi ces choses là ! :)

Edith: Boulet inside, les && c'était pour lancer les 3 commandes de suites, quel gland je fais, désolé les gens ! :)

Mais j'ai encore un petit soucis, une erreur à la fin. Je vous mets l'éxécution complète des 3 commandes, mais ce qui semble clocher ne se situe qu'a la fin. Un problème avec "ranlib" et aussi les prochaines versions de libtool il me semble.

Bloc de code:
Mulot:~/boulot/cobol/libtool-1.5.22 mulot$ ./configure --prefix=/usr &&
> make &&
> sudo make install
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for a sed that does not truncate output... /usr/bin/sed
checking build system type... i386-apple-darwin8.8.1
checking host system type... i386-apple-darwin8.8.1
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for BSD-compatible nm... /usr/bin/nm -p
checking whether ln -s works... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking for gcj... no
checking for windres... no
checking for /usr/bin/ld option to reload object files... -r
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm -p output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common
checking if gcc PIC flag -fno-common works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin8.8.1 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin8.8.1 dyld
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
appending configuration tag "GCJ" to libtool
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating tests/Makefile
config.status: executing depfiles commands
configure: configuring in libltdl
configure: running /bin/sh './configure' --prefix=/usr  '--prefix=/usr' --enable-ltdl-install --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking build system type... i386-apple-darwin8.8.1
checking host system type... i386-apple-darwin8.8.1
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm -p output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common
checking if gcc PIC flag -fno-common works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin8.8.1 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin8.8.1 dyld
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking which extension is used for loadable modules... .so
checking which variable specifies run-time library path... DYLD_LIBRARY_PATH
checking for the default library search path... /usr/local/lib /lib /usr/lib
checking for objdir... .libs
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen in -ldl... yes
checking for dlerror... yes
checking for _ prefix in compiled symbols... yes
checking whether we have to add an underscore for dlsym... no
checking whether deplibs are loaded by dlopen... yes
checking argz.h usability... no
checking argz.h presence... no
checking for argz.h... no
checking for error_t... no
checking for argz_append... no
checking for argz_create_sep... no
checking for argz_insert... no
checking for argz_next... no
checking for argz_stringify... no
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking for memory.h... (cached) yes
checking for stdlib.h... (cached) yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for unistd.h... (cached) yes
checking dl.h usability... no
checking dl.h presence... no
checking for dl.h... no
checking sys/dl.h usability... no
checking sys/dl.h presence... no
checking for sys/dl.h... no
checking dld.h usability... no
checking dld.h presence... no
checking for dld.h... no
checking mach-o/dyld.h usability... yes
checking mach-o/dyld.h presence... yes
checking for mach-o/dyld.h... yes
checking for string.h... (cached) yes
checking for strchr... yes
checking for strrchr... yes
checking for memcpy... yes
checking for memmove... yes
checking for strcmp... yes
checking for closedir... yes
checking for opendir... yes
checking for readdir... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
Making all in .
CONFIG_FILES=libtoolize CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating libtoolize
config.status: executing depfiles commands
chmod +x libtoolize
Making all in libltdl
make  all-am
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c -o ltdl.lo `test -f 'ltdl.c' || echo './'`ltdl.c
 gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c ltdl.c  -fno-common -DPIC -o .libs/ltdl.o
 gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c ltdl.c -o ltdl.o >/dev/null 2>&1
/bin/sh ./libtool --mode=link gcc  -g -O2   -o libltdl.la -rpath /usr/lib -no-undefined -version-info 4:4:1 ltdl.lo -ldl 
rm -fr  .libs/libltdl.3.1.4.dylib .libs/libltdl.3.dylib .libs/libltdl.a .libs/libltdl.dylib .libs/libltdl.la .libs/libltdl.lai
gcc -dynamiclib  -o .libs/libltdl.3.1.4.dylib  .libs/ltdl.o  -ldl  -install_name  /usr/lib/libltdl.3.dylib -Wl,-compatibility_version -Wl,5 -Wl,-current_version -Wl,5.4
(cd .libs && rm -f libltdl.3.dylib && ln -s libltdl.3.1.4.dylib libltdl.3.dylib)
(cd .libs && rm -f libltdl.dylib && ln -s libltdl.3.1.4.dylib libltdl.dylib)
ar cru .libs/libltdl.a  ltdl.o
ranlib .libs/libltdl.a
creating libltdl.la
(cd .libs && rm -f libltdl.la && ln -s ../libltdl.la libltdl.la)
Making all in doc
Making all in tests
make[1]: Nothing to be done for `all'.
Password:
Making install in .
/bin/sh ./mkinstalldirs /usr/bin
 /usr/bin/install -c libtool /usr/bin/libtool
 /usr/bin/install -c libtoolize /usr/bin/libtoolize
/bin/sh ./mkinstalldirs /usr/share/aclocal
 /usr/bin/install -c -m 644 libtool.m4 /usr/share/aclocal/libtool.m4
 /usr/bin/install -c -m 644 ltdl.m4 /usr/share/aclocal/ltdl.m4
/bin/sh ./mkinstalldirs /usr/share/libtool/libltdl
 /usr/bin/install -c -m 644 libltdl/COPYING.LIB /usr/share/libtool/libltdl/COPYING.LIB
 /usr/bin/install -c -m 644 libltdl/README /usr/share/libtool/libltdl/README
 /usr/bin/install -c -m 644 libltdl/configure.ac /usr/share/libtool/libltdl/configure.ac
 /usr/bin/install -c -m 644 libltdl/Makefile.am /usr/share/libtool/libltdl/Makefile.am
 /usr/bin/install -c -m 644 libltdl/ltdl.c /usr/share/libtool/libltdl/ltdl.c
 /usr/bin/install -c -m 644 libltdl/ltdl.h /usr/share/libtool/libltdl/ltdl.h
 /usr/bin/install -c -m 644 libltdl/config.guess /usr/share/libtool/libltdl/config.guess
 /usr/bin/install -c -m 644 libltdl/config.sub /usr/share/libtool/libltdl/config.sub
 /usr/bin/install -c -m 644 libltdl/install-sh /usr/share/libtool/libltdl/install-sh
 /usr/bin/install -c -m 644 libltdl/missing /usr/share/libtool/libltdl/missing
 /usr/bin/install -c -m 644 libltdl/ltmain.sh /usr/share/libtool/libltdl/ltmain.sh
 /usr/bin/install -c -m 644 libltdl/acinclude.m4 /usr/share/libtool/libltdl/acinclude.m4
 /usr/bin/install -c -m 644 libltdl/aclocal.m4 /usr/share/libtool/libltdl/aclocal.m4
 /usr/bin/install -c -m 644 libltdl/Makefile.in /usr/share/libtool/libltdl/Makefile.in
 /usr/bin/install -c -m 644 libltdl/configure /usr/share/libtool/libltdl/configure
 /usr/bin/install -c -m 644 libltdl/config-h.in /usr/share/libtool/libltdl/config-h.in
/bin/sh ./mkinstalldirs /usr/share/libtool
 /usr/bin/install -c -m 644 config.guess /usr/share/libtool/config.guess
 /usr/bin/install -c -m 644 config.sub /usr/share/libtool/config.sub
 /usr/bin/install -c -m 644 install-sh /usr/share/libtool/install-sh
 /usr/bin/install -c -m 644 ltmain.sh /usr/share/libtool/ltmain.sh
make  install-data-hook
chmod +x /usr/share/libtool/config.guess
chmod +x /usr/share/libtool/config.sub
chmod +x /usr/share/libtool/install-sh
chmod +x /usr/share/libtool/libltdl/config.guess
chmod +x /usr/share/libtool/libltdl/config.sub
chmod +x /usr/share/libtool/libltdl/install-sh
chmod +x /usr/share/libtool/libltdl/configure
chmod +x /usr/share/libtool/libltdl/missing
Making install in libltdl
/bin/sh ./mkinstalldirs /usr/lib
 /bin/sh ./libtool --mode=install /usr/bin/install -c  libltdl.la /usr/lib/libltdl.la
/usr/bin/install -c .libs/libltdl.3.1.4.dylib /usr/lib/libltdl.3.1.4.dylib
(cd /usr/lib && { ln -s -f libltdl.3.1.4.dylib libltdl.3.dylib || { rm -f libltdl.3.dylib && ln -s libltdl.3.1.4.dylib libltdl.3.dylib; }; })
(cd /usr/lib && { ln -s -f libltdl.3.1.4.dylib libltdl.dylib || { rm -f libltdl.dylib && ln -s libltdl.3.1.4.dylib libltdl.dylib; }; })
/usr/bin/install -c .libs/libltdl.lai /usr/lib/libltdl.la
/usr/bin/install -c .libs/libltdl.a /usr/lib/libltdl.a
chmod 644 /usr/lib/libltdl.a
ranlib /usr/lib/libltdl.a
*** Warning: inferring the mode of operation is deprecated.
*** Future versions of Libtool will require --mode=MODE be specified.
ranlib: warning: cannot infer operation mode from `/usr/lib/libltdl.a'
ranlib: you must specify a MODE
Try `ranlib --help' for more information.
make[2]: *** [install-libLTLIBRARIES] Error 1
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1
 
C'est pas comme si j'en faisais de ma propre initiative, c'est que c'est au programme !

Pas d'idée sur cette erreur ?

Bloc de code:
chmod 644 /usr/lib/libltdl.a
ranlib /usr/lib/libltdl.a
*** Warning: inferring the mode of operation is deprecated.
*** Future versions of Libtool will require --mode=MODE be specified.
ranlib: warning: cannot infer operation mode from `/usr/lib/libltdl.a'
ranlib: you must specify a MODE
Try `ranlib --help' for more information.
make[2]: *** [install-libLTLIBRARIES] Error 1
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

Y'a pas un moyen plus simple pour faire du cobol sous mac sinon ?
 
Pour ton erreur, elle doit provenir d'une confusion entre les libtool : la version livrée avec Mac OS X n'admet pas de paramètre "--mode" au contraire de celle qui vient avec MacPorts.
En l'occurrence, je pense que le mode qui convient est "link". Tu peux toujours essayer en modifiant le Makefile.

Comme je n'ai pas l'intention d'installer OpenCOBOL, je ne tente pas le coup ;) C'est toi le cobaye :)
 
J'ai cherché dans le makefile et je ne trouve point de --mode, c'est assez étrange. De plus, j'ai quand même essayé de compiler openCobol, et là il me dit que ma version de GMP n'est pas bonne, qu'il faut qu'elle soit au moins la v3, alors que j'ai la 4.2.1.

Bien compliqué tout ça, je comprend pas pourquoi il n'y aurai pas un "NetBeans" ou autre du Cobol, plutôt que de compiler à la main un tas de trucs qui marchent pas ( chez moi).