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

render the local header systemwise #235

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jgmbenoit
Copy link
Contributor

This patch renders the local header local.h systemwise.
Note that this header should be actually installed in an architecture dependent include hierarchy.

@codecov
Copy link

codecov bot commented Feb 27, 2022

Codecov Report

Merging #235 (98f2766) into master (acad331) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #235   +/-   ##
=======================================
  Coverage   92.00%   92.00%           
=======================================
  Files         105      105           
  Lines        2075     2075           
=======================================
  Hits         1909     1909           
  Misses        166      166           
Impacted Files Coverage Δ
libeantic/e-antic/renf_elem.h 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update acad331...98f2766. Read the comment docs.

@saraedum
Copy link
Member

saraedum commented Mar 1, 2022

Thanks for the PR @jgmbenoit.

Note that this header should be actually installed in an architecture dependent include hierarchy.

Where would such headers go typically? I only know about includedir which is "The directory for installing C header files" according to the autoconf manual. Isn't that architecture dependent already typically?

@jgmbenoit
Copy link
Contributor Author

On Debian multi-arch boxes (e.g., i386 (32bits) + amd64 (64bits)) the hierarchy /usr/include is shared, so it is architecture independent. Debian puts architecture dependent header under the hierarchy /usr/include/<triplet> as it puts libraries under /usr/lib/<triplet>. My current understanding is that we have to set it by hand when we use autotools. This page might be a good start. For Debian, I am applying a Debian specific patch so that the <triplet> can be passed at building time (at the time of writing, the git repository used by Debian is down, so I cannot provide a link to the patch)
.
Otherwise, local.h is a very generic name for an header: it would be a very good idea to rename it to avoid any name collision. Something as e-antic-local.h would make the trick.

@saraedum
Copy link
Member

saraedum commented Mar 1, 2022

On Debian multi-arch boxes (e.g., i386 (32bits) + amd64 (64bits)) the hierarchy /usr/include is shared […]

I see. Thanks for the explanation.

Otherwise, local.h is a very generic name for an header: it would be a very good idea to rename it to avoid any name collision. Something as e-antic-local.h would make the trick.

Wouldn't it always be installed into an e-antic/ subdirectory? Even if it it's architecture dependent?

Copy link
Member

@saraedum saraedum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. It would be great if we could add some comments (as suggested) on the changes since they are not obvious (at least not to me). Also, I think you need to add the search path in https://github.com/flatsurf/e-antic/blob/master/doc/manual/Makefile.am#L6 for the docbuild to work.

Finally, could you add an entry in doc/news? See instructions in https://raw.githubusercontent.com/flatsurf/e-antic/master/.github/pull_request_template.md

libeantic/benchmark/Makefile.am Show resolved Hide resolved
@@ -13,7 +13,7 @@
#ifndef E_ANTIC_FMPQ_POLY_EXTRA_H
#define E_ANTIC_FMPQ_POLY_EXTRA_H

#include "local.h"
#include <e-antic/local.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include <e-antic/local.h>
// Include architecture specific settings from e-antic/local.h and not just local.h since the header might be installed to separate architecture specific location on the search path.
#include <e-antic/local.h>

Can we also add a disclaimer like that everywhere? Otherwise, we might just revert this in a few years when we have forgot why this was necessary I am afraid.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

@jgmbenoit
Copy link
Contributor Author

jgmbenoit commented Mar 1, 2022

Wouldn't it always be installed into an e-antic/ subdirectory? Even if it it's architecture dependent?

Indeed. Having said that, a "ceinture et bretelles" ("belt and braces") approach cannot hurt here.

@jgmbenoit
Copy link
Contributor Author

is this patch applied in version 1.2.0 ?

@saraedum
Copy link
Member

saraedum commented Jun 1, 2022

is this patch applied in version 1.2.0 ?

No. I think there were still some open discussions here that we were waiting for.

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

Successfully merging this pull request may close these issues.

3 participants