Skip to content

Replaced "get-cuba.sh" with configure option "--with-cuba=download" - #66

Merged
fredRos merged 6 commits into
bat:masterfrom
oschulz:configure-cuba-download
Sep 14, 2015
Merged

fredRos merged 6 commits into
bat:masterfrom
oschulz:configure-cuba-download

Conversation

@oschulz

@oschulz oschulz commented Sep 4, 2015

Copy link
Copy Markdown
Member

Also removed Cuba directory references from BAT installation.

This closes #49.

@fredRos

fredRos commented Sep 9, 2015

Copy link
Copy Markdown
Contributor

We need a build server! make dist didn't work. I fixed this and some other minor things and uploaded it https://github.com/fredros/bat/tree/configure-cuba-download. One slight detail that worries me:

in models/mtf/libBATmdf.la and the like, cuba appears as a dependency

models/mtf/libBATmtf.la
20:dependency_libs=' -L/home/beaujean/.local/sw/root/linux-ubuntu-14.04-x86_64/6.04.02/lib /home/beaujean/workspace/bat/src/libBAT.la -L/home/beaujean/.local/sw/cuba/linux-ubuntu-14.04-x86_64/4.2/lib -lcuba -lCore -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lMinuit'

Is that a false alarm or can we get into trouble if some libraries are supposed to be loaded automatically and the temporary cuba directory doesn't exist anymore?

@fredRos fredRos mentioned this pull request Sep 9, 2015
@oschulz

oschulz commented Sep 10, 2015

Copy link
Copy Markdown
Member Author

Thanks! I've updated the pull request accordingly.

@fredRos

fredRos commented Sep 10, 2015

Copy link
Copy Markdown
Contributor

in models/mtf/libBATmdf.la and the like, cuba appears as a dependency

models/mtf/libBATmtf.la
20:dependency_libs=' -L/home/beaujean/.local/sw/root/linux-ubuntu-14.04-x86_64/6.04.02/lib /home/beaujean/workspace/bat/src/libBAT.la -L/home/beaujean/.local/sw/cuba/linux-ubuntu-14.04-x86_64/4.2/lib -lcuba -lCore -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lMinuit'

Is that a false alarm or can we get into trouble if some libraries are supposed to be loaded automatically and the temporary cuba directory doesn't exist anymore?

But what about this, any ideas? Do we have to leave it as is? It seems not right to me

oschulz and others added 5 commits September 11, 2015 00:35
As Cuba is linked statically, the BAT installation should not refer
to the Cuba path(s) in any way - especially as it may be only
temporary (e.g. when configured with "--with-cuba=download").
@oschulz
oschulz force-pushed the configure-cuba-download branch from d82d2e3 to af10a97 Compare September 10, 2015 22:37
@oschulz

oschulz commented Sep 10, 2015

Copy link
Copy Markdown
Member Author

in models/mtf/libBATmdf.la and the like, cuba appears as a dependency

Hm, I think libBATmdf.la somehow inherits this from libBAT.la, and it's in libBAT.la because we do link it against Cuba. Maybe there's another way to do this instead via libBAT_la_LIBADD? Not sure ...

@oschulz

oschulz commented Sep 11, 2015

Copy link
Copy Markdown
Member Author

Maybe we should just remove the ".la" files from the BAT installation. They can cause trouble in some situations and are rarely useful. If we were using CMake instead of Automake, we wouldn't have ".la" files either.

@fredRos

fredRos commented Sep 11, 2015

Copy link
Copy Markdown
Contributor

I have only ever used .la files within the same autotools project. I'd say until it actually causes a problem, let's not remove those files. But perhaps autotools thinks it's a dependency because we link it as -lcuba. The linker then statically links libcuba.a because there is no libcuba.so. What if we actually write out libcuba.a with the full path in configure.ac and src/Makefile.am?

@fredRos fredRos self-assigned this Sep 11, 2015
@oschulz

oschulz commented Sep 11, 2015

Copy link
Copy Markdown
Member Author

I have only ever used .la files within the same autotools project. I'd say until it actually causes a problem, let's not remove those files

I don't see any real benefit for the user in keeping them. The trouble is, another libtool-based project (that links against BAT) will use the information in the ".la" files as long as they are there - and if they're not perfect, linking will fail. If they're not there, everything is fine. IMHO ".la" files would only be useful to someone who wanted to use libtool to manually link against BAT, without using bat-config. However, even then I don't think they're very helpful, because they still don't tell you where the header files are. And to run things, LD_LIBRARY_PATH has to be set, and the .la files don't help there, either. I think this whole ".la" thing stems from time when most projects didn't provide a project-config, resp. pkg-config project.

What if we actually write out libcuba.a with the full path in configure.ac and src/Makefile.am

How, exactly? I tried via LDFLAGS, but cuba still ended up in the ".la" files.

"make distcheck" expects file not belonging to the dist to be cleaned
up on "make distclean".
@oschulz

oschulz commented Sep 11, 2015

Copy link
Copy Markdown
Member Author

As the issue with cuba and the ".la" files already existed before this pull request, can we merge this and handle this in a separate issue? I have other code that depends on this PR ready for review.

@fredRos

fredRos commented Sep 14, 2015

Copy link
Copy Markdown
Contributor

What if we actually write out libcuba.a with the full path in configure.ac and src/Makefile.am

How, exactly? I tried via LDFLAGS, but cuba still ended up in the ".la" files.

I meant write /path/to/cuba/libcuba.a instead of -L/path/to/cuba -lcuba.

As the issue with cuba and the ".la" files already existed before this pull request, can we merge this and handle this in a separate issue? I have other code that depends on this PR ready for review.

I agree, we can handle this later. I'll look into the merge

fredRos pushed a commit that referenced this pull request Sep 14, 2015
Replace "get-cuba.sh" with configure option "--with-cuba=download"
@fredRos
fredRos merged commit 98c5b0c into bat:master Sep 14, 2015
@oschulz
oschulz deleted the configure-cuba-download branch September 20, 2015 10:14
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

Successfully merging this pull request may close these issues.

Replace get-cuba.sh by configure option --with-cuba=download

2 participants