Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7876 Discussions

undefined reference for 2022.3 mpiicc

Diehl__Martin
Novice
517 Views

My GitHub Actions started to fail recently, I believe it is related to the update to 2022.3. On my local system, I get

 

/usr/bin/ld: /usr/lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib64/crt1.o: in function `_start':
/build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:103: undefined reference to `main'

 

when invoking mpicc -cc=icx or mpicc -cc=icc

2022.1 works.

0 Kudos
3 Replies
PriyanshuK_Intel
Moderator
479 Views

Hi,

Thank you for posting on intel Communities.


Could you please provide us with Sample reproducer and steps to reproduce the issue, so that we can investigate more on your issue from our end?


Thanks,

Priyanshu.


0 Kudos
Diehl__Martin
Novice
424 Views

I made a mistake when trying to reproduce the error.

 

I noticed it when compiling PETSc on Linux 5.19.13:

 

wget https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.18.0.tar.gz

tar -xf petsc-3.18.0.tar.gz

cd petsc-3.18.0

./configure --with-fc=mpiifort --with-cc='mpiicc -cc=icc' --with-cxx='mpiicpc -cxx=icpc'

 

the problem is that --with-cc='mpiicc -cc=icc' gives a warning which confuses the configure script.

using

 

./configure --with-fc=mpiifort --with-cc='mpiicc -cc=icc -diag-disable=10441' --with-cxx='mpiicpc -cxx=icpc -diag-disable=10441'.

 

solves this.

0 Kudos
PriyanshuK_Intel
Moderator
394 Views

Hi,


Glad to know that your issue is resolved. Thanks for sharing the solution with us. 

If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks,

Priyanshu.


0 Kudos
Reply