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

Building with autotools (not all libs are copied) #57

Open
alexavr opened this issue Jun 19, 2019 · 9 comments
Open

Building with autotools (not all libs are copied) #57

alexavr opened this issue Jun 19, 2019 · 9 comments
Labels
autotools autotools build issues

Comments

@alexavr
Copy link

alexavr commented Jun 19, 2019

Hello,
and HUGE thanks for your enormous effort. Now datetime operations in FORTRAN have stopped being a nightmare! 👍 One weird thing I'd like to highlight though. Building with autotools:

./configure --prefix=/path/to/folder
make 
make install

at the make install stage the only datetime_module.mod is actually copied in the destination include folder. That is not enough to link datetime.
Fast solution: manually copy all *.mod files from src/lib to /path/to/folder/include.
The issue is probably OS related. I'm using CentOS7, ifort-19.

@milancurcic
Copy link
Member

I tried this and couldn't reproduce on my Ubuntu 18.10. I'm not experienced with autotools, maybe @tcanich will have an idea.

@alexavr
Copy link
Author

alexavr commented Jun 19, 2019

Weird... Have just tried on my Mac -- the same result. I did:

wget https://github.com/wavebitscientific/datetime-fortran/releases/download/v1.6.0/datetime-fortran-1.6.0.tar.gz
FC=ifort ./configure --prefix=/opt/datetime-fortran-1.6.0
make 
make check
sudo make install

All went smoothly but there is only datetime_module.mod in the include folder. So I had to cp other *.mod files from src/lib/ again. I'm not an expert in autotools as well. That's why I couldn't fix it by myself.
Anyway, it's not a big deal :)
Thanx again!

@milancurcic
Copy link
Member

Is there anything in your lib folder, /opt/datetime-fortran-1.6.0/lib?

@alexavr
Copy link
Author

alexavr commented Jun 19, 2019

Yes:

ls /opt/datetime-fortran-1.6.0/lib/
libdatetime.a	pkgconfig

tcanich added a commit to tcanich/datetime-fortran that referenced this issue Jun 19, 2019
@tcanich
Copy link
Contributor

tcanich commented Jun 19, 2019 via email

@milancurcic
Copy link
Member

Thanks, Tom, I will try it.

Alexander: I'm sorry, I read your original message but somehow my brain went somewhere else. I also get only datetime_module.mod in the include directory. However, I struggle reproducing this:

That (datetime_module.mod) is not enough to link datetime.

Can you give an example program that needs any other module than datetime_module.mod?

@alexavr
Copy link
Author

alexavr commented Jun 19, 2019

Thank you, Tom!

Milan, It was early morning when I was writing that. Apologize :)
I meant that having the datetime_module.mod only in the include folder makes compiling FORTRAN code with use datetime_module impossible.
But if I copy all *.mod files from src/lib to the include -- everything compiles and works perfectly.

@milancurcic
Copy link
Member

Got it, but I'm saying for me I can build with just datetime_module.mod, with gfortran.

I just tried with ifort and indeed I can't, just like you. This looks like an Intel-specific issue, however from the top of my head, I don't know whether the GNU or the Intel behavior is standard conforming. I will do some research.

Anyway, for now, it doesn't hurt for now to copy all .mod files to make ifort happy.

@alexavr
Copy link
Author

alexavr commented Jun 19, 2019

Agreed. It doesn't ;)
Maybe it's related to shared/dynamic compilation but I couldn't find this option in configure.

@scivision scivision added the autotools autotools build issues label Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autotools autotools build issues
Projects
None yet
Development

No branches or pull requests

4 participants