Closed jjffkkgg closed 3 years ago
No specific advice, you will note here that it works for my build https://github.com/OpenAADL/ocarina/runs/1859874501?check_suite_focus=true
My only suggestion would be to check that gnat's gcc is actually the first in the path. In some occasions, I have seen cc point to llvm instead of gcc and this broke builds
what is it mean that gcc path is the first in gnat? Is there a specific way that I can check and fix? Thank you
I meant GNAT should be the first in the path. Specifically, gcc --version and cc --version should match your GNAT installation.
Also, the portion of config.log that shows the error below would probably help me to diagnose the issue
You may also want to read this: https://github.com/AdaCore/gprbuild/issues/21
As a work around, install GNAT community edition; this is usually safer than Linux distribution versions of GNAT
Here is the core test part of config.log. Here it seems to contains the error.
Let me try to re-install GNAT with community one.
configure:1947: checking build system type configure:1961: result: x86_64-pc-linux-gnu configure:1981: checking host system type configure:1994: result: x86_64-pc-linux-gnu configure:2014: checking target system type configure:2027: result: x86_64-pc-linux-gnu configure:2070: checking for a BSD-compatible install configure:2138: result: /usr/bin/install -c configure:2149: checking whether build environment is sane configure:2204: result: yes configure:2355: checking for a thread-safe mkdir -p configure:2394: result: /bin/mkdir -p configure:2401: checking for gawk configure:2431: result: no configure:2401: checking for mawk configure:2417: found /usr/bin/mawk configure:2428: result: mawk configure:2439: checking whether make sets $(MAKE) configure:2461: result: yes configure:2490: checking whether make supports nested variables configure:2507: result: yes configure:2586: checking how to create a pax tar archive configure:2597: tar --version tar (GNU tar) 1.29 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason. configure:2600: $? = 0 configure:2640: tardir=conftest.dir && eval tar --format=posix -chf - "$tardir" >conftest.tar configure:2643: $? = 0 configure:2647: tar -xf - <conftest.tar configure:2650: $? = 0 configure:2652: cat conftest.dir/file GrepMe configure:2655: $? = 0 configure:2668: result: gnutar configure:2725: checking for mv configure:2741: found /bin/mv configure:2752: result: mv configure:2762: checking for rm configure:2778: found /bin/rm configure:2789: result: rm configure:2799: checking for cp configure:2815: found /bin/cp configure:2826: result: cp configure:2836: checking for grep configure:2852: found /bin/grep configure:2863: result: grep configure:2873: checking for chmod configure:2889: found /bin/chmod configure:2900: result: chmod configure:2951: checking for strip configure:2967: found /usr/bin/strip configure:2978: result: strip configure:3043: checking for ranlib configure:3059: found /usr/bin/ranlib configure:3070: result: ranlib configure:3104: checking for style of include used by make configure:3132: result: GNU configure:3203: checking for gcc configure:3230: result: gcc configure:3459: checking for C compiler version configure:3468: gcc --version >&5 gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3479: $? = 0 configure:3468: gcc -v >&5 Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-3ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) configure:3479: $? = 0 configure:3468: gcc -V >&5 gcc: error: unrecognized command line option '-V' gcc: fatal error: no input files compilation terminated. configure:3479: $? = 1 configure:3468: gcc -qversion >&5 gcc: error: unrecognized command line option '-qversion'; did you mean '--version'? gcc: fatal error: no input files compilation terminated. configure:3479: $? = 1 configure:3499: checking whether the C compiler works configure:3521: gcc conftest.c >&5 configure:3525: $? = 0 configure:3573: result: yes configure:3576: checking for C compiler default output file name configure:3578: result: a.out configure:3584: checking for suffix of executables configure:3591: gcc -o conftest conftest.c >&5 configure:3595: $? = 0 configure:3617: result: configure:3639: checking whether we are cross compiling configure:3647: gcc -o conftest conftest.c >&5 configure:3651: $? = 0 configure:3658: ./conftest configure:3662: $? = 0 configure:3677: result: no configure:3682: checking for suffix of object files configure:3704: gcc -c conftest.c >&5 configure:3708: $? = 0 configure:3729: result: o configure:3733: checking whether we are using the GNU C compiler configure:3752: gcc -c conftest.c >&5 configure:3752: $? = 0 configure:3761: result: yes configure:3770: checking whether gcc accepts -g configure:3790: gcc -c -g conftest.c >&5 configure:3790: $? = 0 configure:3831: result: yes configure:3848: checking for gcc option to accept ISO C89 configure:3911: gcc -c -g -O2 conftest.c >&5 configure:3911: $? = 0 configure:3924: result: none needed configure:3949: checking whether gcc understands -c and -o together configure:3971: gcc -c conftest.c -o conftest2.o configure:3974: $? = 0 configure:3971: gcc -c conftest.c -o conftest2.o configure:3974: $? = 0 configure:3986: result: yes configure:4005: checking dependency style of gcc configure:4116: result: none configure:4136: checking for gnatmake configure:4152: found /usr/bin/gnatmake configure:4163: result: gnatmake configure:4185: checking for gnatmake configure:4201: found /usr/bin/gnatmake configure:4212: result: gnatmake configure:4230: checking for gnatchop configure:4246: found /usr/bin/gnatchop configure:4257: result: gnatchop configure:4267: checking if the Ada compiler works configure:4282: cd conftest && gnatchop -q src.ada && gnatmake -c check.adb > /dev/null 2>../conftest.out configure:4285: $? = 0 configure:4288: result: yes configure:4348: checking if the Ada compiler works configure:4363: cd conftest && gnatchop -q src.ada && gnatmake -c check.adb > /dev/null 2>../conftest.out configure:4366: $? = 0 configure:4369: result: yes configure:4470: checking whether gnatmake supports -aPdir configure:4473: gnatmake 2>&1 | grep -aPdir > /dev/null configure:4476: $? = 0 configure:4483: result: yes configure:4497: checking for gnatclean configure:4513: found /usr/bin/gnatclean configure:4524: result: gnatclean configure:4534: checking for gnatls configure:4550: found /usr/bin/gnatls configure:4561: result: gnatls configure:4582: checking for python configure:4600: found /usr/bin/python configure:4612: result: /usr/bin/python configure:4633: checking for python version configure:4640: result: 2.7 configure:4652: checking for python platform configure:4659: result: linux2 configure:4685: checking for python script directory configure:4720: result: ${prefix}/lib/python2.7/site-packages configure:4729: checking for python extension module directory configure:4764: result: ${exec_prefix}/lib/python2.7/site-packages configure:4780: checking for gprbuild configure:4798: found /usr/bin/gprbuild configure:4811: result: /usr/bin/gprbuild configure:4821: checking for gprinstall configure:4839: found /usr/bin/gprinstall configure:4852: result: /usr/bin/gprinstall configure:4865: checking that your gnat compiler works with a simple example configure:4891: result: no configure:4893: error: /usr/bin/gprbuild test failed at compile time! Check your configuration.
There is a contradiction between your logs, your first message had
OS: Ubuntu 18.04.5 LTS x86_64 Compiler: GNATMAKE 8.4.0
the logs have
configure:3468: gcc --version >&5 gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc.
gnatmake --version and gcc --version should be the same version number
That probably because I installed gnatmake and gcc individually. should I clean or downgrade one of those?
Check my own logs; everything just works fine with default gcc and gnatmake both at version 7.5.0 Ubuntu should not have allowed such discrepancy in your installation in the first place. Make sure you have our version. I suggest you use GNAT CE 2020, and as I wrote, be sure to put GNAT CE 2020 install directory first in your path
I tried both ways - one with GNAT CE 2020 and downgraded gnat version. I could not find a way to execute with CE/bin commands, but I could successfully install ocarina after I downgrade gnat-8 to gnat-7. Thank you for the help!
Hello, I am using Ubuntu 18.04 with VirtualBox VM.
Here I have an issue with building..
$ ./build_ocarina.sh --scenario=fresh-install
OS: Ubuntu 18.04.5 LTS x86_64 Compiler: GNATMAKE 8.4.0 autoconf: autoconf (GNU Autoconf) 2.69 automake: automake (GNU automake) 1.15.1 [2021-02-11-16:12] Checkout the Ocarina sources [PASSED] [2021-02-11-16:12] Fetching runtimes 'polyorb-hi-ada polyorb-hi-c aadlib' [PASSED] [2021-02-11-16:12] Reconfiguring (Ocarina) [PASSED] [2021-02-11-16:12] First configure (Ocarina)[2021-02-11-16:12] First configure (Ocarina) [FAILED] checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking how to create a pax tar archive... gnutar checking for mv... mv checking for rm... rm checking for cp... cp checking for grep... grep checking for chmod... chmod checking for strip... strip checking for ranlib... ranlib checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no 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 ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... none checking for gnatmake... gnatmake checking for gnatmake... gnatmake checking for gnatchop... gnatchop checking if the Ada compiler works... yes checking if the Ada compiler works... yes checking whether gnatmake supports -aPdir... yes checking for gnatclean... gnatclean checking for gnatls... gnatls checking for python... /usr/bin/python checking for python version... 2.7 checking for python platform... linux2 checking for python script directory... ${prefix}/lib/python2.7/site-packages checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages checking for gprbuild... /usr/bin/gprbuild checking for gprinstall... /usr/bin/gprinstall checking that your gnat compiler works with a simple example... Error: no native compiler found for language 'ada', default runtime conftest.gpr:1:09: no languages defined for this project gprbuild: "conftest.gpr" processing failed no configure: error: /usr/bin/gprbuild test failed at compile time! Check your configuration.
I tested gnatmake with hello_world example, but it did not have any issue with it.
Can I get any advice on this issue?