-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++ compiler cannot create executables #738
Comments
GCC doesn’t necessarily come with g++. Does which g++ show anything? If not, try: sudo apt-get install g++
Dave
From: thw1021 [mailto:notifications@github.com]
Sent: Monday, July 22, 2019 8:38 AM
To: su2code/SU2 <SU2@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: [su2code/SU2] C++ compiler cannot create executables (#738)
Dear developers,
I am trying to install SU2 in docker ubuntu 18.04 container so that I can easily share with partner. But I failed to compile the code with following errors:
(base) root@a5502ebdff64:/home/SU2# ./configure --prefix=/home/SU2/SU2_Install CXXFLAGS="-O3" --enable-mpi --with-cc=/usr/bin/mpicc --with-cxx=/usr/bin/mpicxx
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 whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking whether the C++ compiler works... no
configure: error: in `/home/SU2':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
I am sure that I have installed gcc/g++ successfully. You can see
(base) root@a5502ebdff64:/home# gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.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.
(base) root@a5502ebdff64:/home# g++ -o hello hello.cc
(base) root@a5502ebdff64:/home# ./hello
Hello, World!
I have uploaded the config.log file. Could you give me some suggestions, please?
config.log<https://github.com/su2code/SU2/files/3418183/config.log>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#738?email_source=notifications&email_token=AADV2HBFP42OXAJCIZGTH2DQAXH4ZA5CNFSM4IFZ52EKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HAVNCNA>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AADV2HFS5T4HH2MWIC4JR4TQAXH4ZANCNFSM4IFZ52EA>.
|
Yes. I did have installed g++.
|
What about mpicc and mpicxx? You are trying to build a parallel executable, so is MPI installed? |
I install OpenMPI following the instructions with commands:
and I can see the version
|
Are the compiler wrappers, mpicc and mpicxx, also installed? When I look in your log file it mentions |
Below you can find the steps I used to build a singularity container using ubuntu 19.04. For pure docker and ubuntu 18.04 the steps should be the same I guess.
|
Sorry. Do you mean that although I have installed OpenMPI, I still have to install mpicc and mpicxx ? I am not familiar with such problems. |
Those would come from package openmpi-dev
From: thw1021 [mailto:notifications@github.com]
Sent: Monday, July 22, 2019 9:13 AM
To: su2code/SU2 <SU2@noreply.github.com>
Cc: Dave Taflin <d.taflin@tecplot.com>; Comment <comment@noreply.github.com>
Subject: Re: [su2code/SU2] C++ compiler cannot create executables (#738)
Sorry. Do you mean that although I have installed OpenMPI, I still have to install mpicc and mpicxx ? I am not familiar with such problems.
When I run which mpicc and which mpicxx in the container, there is no outputs. But on the host machine, I can see /usr/bin/mpicc and /usr/bin/mpicxx. Maybe this the reason.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#738?email_source=notifications&email_token=AADV2HHQUIUX3M4FOVSIWTTQAXL7JA5CNFSM4IFZ52EKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2QLXTI#issuecomment-513850317>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AADV2HGXH2W6SXJCN4OLCXLQAXL7JANCNFSM4IFZ52EA>.
|
…or maybe libopenmpi-dev
From: Dave Taflin
Sent: Monday, July 22, 2019 9:18 AM
To: su2code/SU2 <reply@reply.github.com>; su2code/SU2 <SU2@noreply.github.com>
Cc: Comment <comment@noreply.github.com>
Subject: RE: [su2code/SU2] C++ compiler cannot create executables (#738)
Those would come from package openmpi-dev
From: thw1021 [mailto:notifications@github.com]
Sent: Monday, July 22, 2019 9:13 AM
To: su2code/SU2 <SU2@noreply.github.com<mailto:SU2@noreply.github.com>>
Cc: Dave Taflin <d.taflin@tecplot.com<mailto:d.taflin@tecplot.com>>; Comment <comment@noreply.github.com<mailto:comment@noreply.github.com>>
Subject: Re: [su2code/SU2] C++ compiler cannot create executables (#738)
Sorry. Do you mean that although I have installed OpenMPI, I still have to install mpicc and mpicxx ? I am not familiar with such problems.
When I run which mpicc and which mpicxx in the container, there is no outputs. But on the host machine, I can see /usr/bin/mpicc and /usr/bin/mpicxx. Maybe this the reason.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#738?email_source=notifications&email_token=AADV2HHQUIUX3M4FOVSIWTTQAXL7JA5CNFSM4IFZ52EKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2QLXTI#issuecomment-513850317>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AADV2HGXH2W6SXJCN4OLCXLQAXL7JANCNFSM4IFZ52EA>.
|
And btw in case you want to really use MPI with containers, you should use singularity (https://sylabs.io/) as it is exactly designed for this. |
Yes. Thank you all. I installed libopenmpi-dev and openmpi-common. I don't know which one is the key but I can see SU2_RUN and SU2_HOME environment variables displayed at the conclusion of configure. |
Thank you. I will close this issue after I make sure that I have installed successfully. |
@talbring |
Thank you all.
Should I directly ignore such warnings ? Any suggestion would be grateful. |
OpenMPI is not officially supported when using a docker container. See my comment above and open-mpi/ompi#3625 (comment) |
Here is the full definition file for singularity:
Store it in file called
You can then run it like that:
The only thing to note is that the OpenMPI version you use inside the container and on the machine you want to run it should be similar. I tried it with OpenMPI v3 in the container and OpenMPI v4 outside and it worked. |
OK. I will try as you suggested. Thanks for your kind help. |
Dear developers,
I am trying to install SU2 in docker ubuntu 18.04 container so that I can easily share with partner. But I failed to compile the code with following errors:
I am sure that I have installed gcc/g++ successfully. You can see
I have uploaded the
config.log
file. Could you give me some suggestions, please?config.log
The text was updated successfully, but these errors were encountered: