This is the old SliTaz forum - Please use the main forum.slitaz.org

[SOLVED] compile gcc with --enable-languages=fortran
  • TotoetsasoeurTotoetsasoeur February 2010
    Dear members,
    I am trying to make Octave running on Slitaz. Apparently, Octave needs gfortran (gcc with fortran).

    I spend many hours trying to compile a new gcc with languages = fortran but now I really need some help.

    ...
    The configure process run well:

    $../gcc-4.4.3/configure --prefix=/usr/local/gcc_4.4.3 --enable-languages=c,c++,fortran

    ...

    But the make process just failed with:

    checking for suffix of object files... configure: error: in `/home/toto/Téléchargements/gcc_4.4.3/gcc-build/i686-pc-linux-gnu/libgcc':
    configure: error: cannot compute suffix of object files: cannot compile
    See `config.log' for more details.
    make[2]: *** [configure-stage2-target-libgcc] Erreur 1
    make[2]: quittant le répertoire « /home/toto/Téléchargements/gcc_4.4.3/gcc-build »
    make[1]: *** [stage2-bubble] Erreur 2
    make[1]: quittant le répertoire « /home/toto/Téléchargements/gcc_4.4.3/gcc-build »
    make: *** [all] Erreur 2


    ...

    Having a look at the config.log file. I don't want to post all the config.log. Here are only the error lines:

    configure:3757: gcc -c -g -O2 conftest.c >&5
    conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'me'
    configure:3763: $? = 1
    configure: failed program was:
    | #ifndef __cplusplus
    | choke me
    | #endif
    configure:3948: checking for g++

    ...
    configure:4209: g++ -c -g -O2 conftest.cc >&5
    conftest.cc: In function 'int main()':
    conftest.cc:13: error: 'exit' was not declared in this scope
    configure:4215: $? = 1
    configure: failed program was:
    | /* confdefs.h. */
    |
    | #define PACKAGE_NAME ""
    | #define PACKAGE_TARNAME ""
    | #define PACKAGE_VERSION ""
    | #define PACKAGE_STRING ""
    | #define PACKAGE_BUGREPORT ""
    | /* end confdefs.h. */
    |
    | int
    | main ()
    | {
    | exit (42);
    ...
    configure:4912: gcc -c -g -O2 -I/include conftest.c >&5
    conftest.c:12:19: error: ppl_c.h: No such file or directory
    conftest.c: In function 'main':
    conftest.c:18: error: 'choke' undeclared (first use in this function)
    conftest.c:18: error: (Each undeclared identifier is reported only once
    conftest.c:18: error: for each function it appears in.)
    conftest.c:18: error: expected ';' before 'me'
    configure:4918: $? = 1
    configure: failed program was:
    | /* confdefs.h. */
    |
    | #define PACKAGE_NAME ""
    | #define PACKAGE_TARNAME ""
    | #define PACKAGE_VERSION ""
    | #define PACKAGE_STRING ""
    | #define PACKAGE_BUGREPORT ""
    | #ifdef __cplusplus
    | extern "C" void exit (int) throw ();
    | #endif
    | /* end confdefs.h. */
    | #include "ppl_c.h"
    | int
    ...
    configure:5031: gcc -c -g -O2 -I/include -DCLOOG_PPL_BACKEND conftest.c >&5
    conftest.c:12:25: error: cloog/cloog.h: No such file or directory
    conftest.c: In function 'main':
    conftest.c:18: error: 'choke' undeclared (first use in this function)
    conftest.c:18: error: (Each undeclared identifier is reported only once
    conftest.c:18: error: for each function it appears in.)
    conftest.c:18: error: expected ';' before 'me'
    configure:5037: $? = 1
    configure: failed program was:
    | /* confdefs.h. */
    |
    | #define PACKAGE_NAME ""
    | #define PACKAGE_TARNAME ""
    | #define PACKAGE_VERSION ""
    | #define PACKAGE_STRING ""
    | #define PACKAGE_BUGREPORT ""
    | #ifdef __cplusplus
    | extern "C" void exit (int) throw ();
    | #endif
    | /* end confdefs.h. */
    | #include "cloog/cloog.h"
    | int
    | main ()
    | {
    |
    | #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15
    | choke me

    ...

    Here is the gcc version I am using:
    $ gcc -v
    Utilisation des specs internes.
    Target: i486-pc-linux-gnu
    Configuré avec: ../gcc-4.4.1/configure --prefix=/usr --libexecdir=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls --enable-languages=c,c++,java --enable-shared --with-system-zlib --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit --enable-threads=posix --with-tune=i486 --enable-java-home --with-arch-directory=i386 --with-jvm-root-dir=/usr/lib/jvm/java-gcj --with-jvm-jar-dir=/usr/lib/jvm-exports/java-gcj --with-python-dir=/lib/python2.5/site-packages --with-x --enable-java-awt=gtk --enable-gtk-cairo --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu i486-pc-linux-gnu
    Modèle de thread: posix
    gcc version 4.4.1 (GCC)
    $

    ...

    I would appreciate any advices on how to build gcc with fortran language option.
    Stephane
  • bellardbellard February 2010
    Dear user,

    Can you check the new gfortran package ?

    # tazpkg recharge
    # tazpkg get-install gcc --forced
    # tazpkg get-install gfortran


    -pascal
  • TotoetsasoeurTotoetsasoeur February 2010
    Hey,
    There is a gfortran under the field "description"!! But the package is not available:

    $ tazpkg get-install gfortran
    Unable to find : gfortran in the mirrored packages list.
    Unable to find : get-gfortran in the mirrored packages list.
    $


    It looks like gfortran is not on server.

    Thanks for your feedback.
    Stephane
  • bellardbellard February 2010
    Hi,

    Please recharge lists.
    Note octave is available on mirror.slitaz.org :
    http://mirror.slitaz.org/packages/cooking/octave-3.2.4.tazpkg

    -pascal
  • TotoetsasoeurTotoetsasoeur February 2010
    @pascal,
    Thank you, thank you and THANK YOUUUUUUU for providing octave, gfortran and depedencies.

    You are just amazing.

    Working under Slitaz is GREAT.

    Cheers
    Stephane

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social