Skip to content
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

ifort linking error on linux machine #38

Open
lkampoli opened this issue Nov 4, 2021 · 1 comment
Open

ifort linking error on linux machine #38

lkampoli opened this issue Nov 4, 2021 · 1 comment

Comments

@lkampoli
Copy link

lkampoli commented Nov 4, 2021

Dear Elias,
thanks for your valuable and useful project!

I would like to use forpy in my code in order to use some machine learning algorithm. My code is compiled with ifort.
So, while compiling and linking forpy with gfortran is ok, when I try with ifort it is a bit more problematic and I cannot successfully link it. I tried to disable lto also in ifort with -fno-fat-lto-objects but I still get an error:

In particular when I run:

ifort intro_to_forpy.F90 forpy_mod.o python3-config --ldflags

ld: /home/lk/intel/oneapi/intelpython/python3.7/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.a(posixmodule.o): in function os_forkpty': (.text.unlikely+0x2307): undefined reference to forkpty'
ld: /home/lk/intel/oneapi/intelpython/python3.7/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.a(posixmodule.o): in function os_openpty': (.text.unlikely+0x25e2): undefined reference to openpty'

Have you encountered such issue?

Thank you,
Lorenzo

@ylikx
Copy link
Owner

ylikx commented Nov 5, 2021

Hi,

It seems that you are trying to link with the libraries of the Intel Python distribution. I don't have experience with that, but according to https://stackoverflow.com/questions/4491350/undefined-reference-to-forkpty
you need to link against libutil (option -lutil)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants