Questions about the build system  [SOLVED]

Moderator: pouillon

Post Reply
Jordan
Posts: 282
Joined: Tue May 07, 2013 9:47 am

Questions about the build system

Post by Jordan » Wed Sep 04, 2013 4:48 pm

Dear Yann,

I have just noticed that sometimes, when we are in the build folder and run "make clean" the configure script is run before cleaning.
Is this really necessary ?
In the same idea, it happens that we do a "make clean" just to rebuild everything, therefore we don't need the configure script to be run. Unfortunately, make clean deletes de Makefile...
Maybe there should have a soft "make clean" compared to the "make distclean" ?

Also for the configure stage, I wonder why the configure script can not automatically find all the include directories and librairy directories for fallbacks (using pkg-config?)
One has to add something like --with-PACKAGE-incs="$(pkg-config --cflags libpackage)" whereas it should be more user friendly to get that automated as for fftw, shouldn't it ?

Thank you

Jordan

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Questions about the build system  [SOLVED]

Post by pouillon » Mon Sep 09, 2013 12:07 pm

I have just noticed that sometimes, when we are in the build folder and run "make clean" the configure script is run before cleaning.
Is this really necessary ?


It is not necessary and hence not done. I don't have this problem on any of my computers, and the test farm checks that 'make clean' duly performs its duty. If such a thing happened, we would see it.

In the same idea, it happens that we do a "make clean" just to rebuild everything, therefore we don't need the configure script to be run. Unfortunately, make clean deletes de Makefile...
Maybe there should have a soft "make clean" compared to the "make distclean" ?


It doesn't seem to be a generic problem. Could you describe your exact configuration and build environment, the way you build Abinit (e.g. with or without build dir, ...), and give every possible detail, so that I get a chance to reproduce the issue?

Also for the configure stage, I wonder why the configure script can not automatically find all the include directories and librairy directories for fallbacks (using pkg-config?)
One has to add something like --with-PACKAGE-incs="$(pkg-config --cflags libpackage)" whereas it should be more user friendly to get that automated as for fftw, shouldn't it ?


I wish we could rely on this simple and efficient procedure! Unfortunately, in practice, most supercomputers are at best ill-configured, with different versions and build variants of many libraries hanging around, accompanied by inconsistent settings of the environment variables. For example, it is not uncommon to find several instances of FFTW, one or two builds for version 2, other builds for version 3, some of them with OpenMP, other with MPI, others with both, ... How could the build system guess which one you want to use? If you're extremely lucky and your system is perfectly configured, then you can indeed use pkg-config and I can tell you one thing: take very good care of your systems administrators! One day, your case may become the rule ... in 2000 or 3000 years at the current pace.

Another thing is that the projects for which we provide fallbacks are external to Abinit and totally free in their evolution. To make things worse, different versions of Abinit need different versions of the fallbacks. Only some of them currently support pkg-config, some only from recently, and there is no guarantee that they will keep on doing so. As such, the build system cannot make any assumption on the way to build them.

I did my best to find the most generic and efficient compromise, but I don't claim I've found *THE* solution. Feel free to share any proposal you think would work better and satisfy all stakeholders: users, developers, maintainers and packagers.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

Jordan
Posts: 282
Joined: Tue May 07, 2013 9:47 am

Re: Questions about the build system

Post by Jordan » Wed Sep 11, 2013 1:53 pm

Thank you for your answer,

Trying to give you more details I now understand my issues. The two first points were linked.

Let assume we run the make script. Then, for debugging reason, I run makemake which creats a new configure file. Thus running the old Makefile with "make clean" starts the configure script and cleans. As the Makefile was (?) removed, I had to run configure again before building but It seems that the Makefile is not deleted with make clean.

About the third point, I understand your point and I don't have THE solution. It would have been nice if it had worked.
For your example i guess that the build system should use the fftw with the same parallelism options as for abinit. How to guess the directories ? I have no clue. The prefix used for the installation may be enough.

Once again, thank you for the explanations.

Jordan

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Questions about the build system

Post by pouillon » Thu Sep 12, 2013 1:04 pm

To complete my answer, I just wanted to add that I've already planned to simplify the user interface of the build system. I'm just waiting the 7.5.3 branches to start the implementation.

By the way: "make clean" will never remove a Makefile, but "makemake --clean" does remove all of them.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

atha1984
Posts: 4
Joined: Thu Sep 19, 2013 3:37 pm

Re: Questions about the build system

Post by atha1984 » Wed Sep 25, 2013 8:04 pm

Dear All,

I have to apologize beforehand if my question is going to be
a repeat. I have problems right from the start where I have to configure and I
want to use an <myhostname>.ac
My configuration is unsuccessful and the output config.log says:
configure: 3615: checking build system type
configure : 3626: error /bin/sh config/gnu/config.sub <myhostname>.ac failed

The machine details and abinit version are:

[root@hostname abinit-7.4.2]# uname -a
Linux hostname 3.10.11-200.fc19.x86_64 GNU/Linux

Any advice would be appreciated.
Regards,

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Questions about the build system

Post by pouillon » Thu Sep 26, 2013 8:42 pm

You have to replace the "<myhostname>" keyword by the output of the "hostname" command.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

atha1984
Posts: 4
Joined: Thu Sep 19, 2013 3:37 pm

Re: Questions about the build system

Post by atha1984 » Thu Sep 26, 2013 11:00 pm

Hello,

I already had!
So when I had <myhostname>= Atefeh (which is my hostname), it didn't work.
But I just changed it to the output of
#./config.guess

it seems it started to work...
I am a bit confused about this.
Thank you

atha1984
Posts: 4
Joined: Thu Sep 19, 2013 3:37 pm

Re: Questions about the build system

Post by atha1984 » Fri Sep 27, 2013 12:38 am

Hi,

I prepared my .ac file according to http://www.youtube.com/watch?v=DppLQ-KQA68 with correct library paths.

The configuration starts with a warning

[root@Atefeh abinit-7.4.2]# ./configure --with-config-file x86_64-unknown-linux-gnu.ac
configure: WARNING: you should use --build, --host, --target
==============================================================================
=== Overall startup ===
==============================================================================

checking build system type... x86_64-unknown-linux-gnu.ac
checking host system type... x86_64-unknown-linux-gnu.ac
checking target system type... x86_64-unknown-linux-gnu.ac
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... (cached) gawk
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for realpath,readlink... no
configure: error: config file yes not found

And I have attached my config.log as well.
Thanks very much for your attention and time.
BR, Ati
Attachments
config.log
(21.58 KiB) Downloaded 259 times

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Questions about the build system

Post by pouillon » Wed Oct 02, 2013 12:17 pm

You're missing an equal sign after --with-config-file, which is equivalent to say --with-config-file="yes". Thus your file is taken as a separate argument and hence the warning and the error.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

Post Reply