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

base: add support for Pmac module. #26

Merged
merged 1 commit into from
Nov 29, 2023
Merged

base: add support for Pmac module. #26

merged 1 commit into from
Nov 29, 2023

Conversation

guirodrigueslima
Copy link
Contributor

No description provided.

Copy link
Collaborator

@henriquesimoes henriquesimoes left a comment

Choose a reason for hiding this comment

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

As we talked in person, pmac may be installed with install_github_module (or even with download_github_module and install_module). Refactor to simplify things when #27 is merged.

I've found some points to improve nevertheless. You may work on them when refactoring changes.

base/.env Outdated Show resolved Hide resolved
base/Dockerfile Outdated Show resolved Hide resolved
base/install_motor.sh Outdated Show resolved Hide resolved
base/install_motor.sh Outdated Show resolved Hide resolved
base/install_motor.sh Outdated Show resolved Hide resolved
base/install_motor.sh Show resolved Hide resolved
base/install_motor.sh Outdated Show resolved Hide resolved
Copy link
Collaborator

@henriquesimoes henriquesimoes left a comment

Choose a reason for hiding this comment

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

I don't think you need to specify the version in your commit message.

I'm missing an explanation in the message about the linux-x86_64 configuration files we removed. Explaining why we used --variable=includedir instead of --cflags-only-I may also be mentioned.

Indicating that the compilation error is probably due to not well-defined dependencies in the module's Makefile might be worth it to make this detail clearer.

base/.env Show resolved Hide resolved
base/install_motor.sh Outdated Show resolved Hide resolved

SSH = $(pkg-config --variable=prefix libssh2)
SSH_LIB = $(pkg-config --variable=libdir libssh2)
SSH_INCLUDE = -I$(pkg-config --variable=includedir libssh2)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ericonr, do you have any clue why --cflags-only-I wouldn't work even with variables defined in libssh2.pc?

I've compared the syntax along with @guirodrigueslima, but I couldn't understand what was happening. In this case, it is okay to have includedir, since it has a single include directory.

@henriquesimoes henriquesimoes marked this pull request as ready for review November 17, 2023 19:52
Copy link
Collaborator

@henriquesimoes henriquesimoes left a comment

Choose a reason for hiding this comment

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

Looks good for me. Waiting for @ericonr's opinion on that.

Copy link
Member

@ericonr ericonr left a comment

Choose a reason for hiding this comment

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

I will try to take a look at the pkg-config issue. It's likely that the package is available in the default includedir, so there's no need to actually define any cflag for it.

EDIT: that was just it. Does the build explicitly require the INCLUDES variable be defined?

I believe this PR is missing documentation update (in the README) mentioning the new libssh2 dependency for IOCs using the Pmac module.

If possible, formatting the commit message body to fit in 72 columns would also be nice (can be done inside Vim in git commit --amend dialog by selecting the body and pressing gq). Otherwise I can do it myself before merging.

base/install_motor.sh Outdated Show resolved Hide resolved
base/install_motor.sh Outdated Show resolved Hide resolved
base/install_motor.sh Outdated Show resolved Hide resolved
base/install_motor.sh Outdated Show resolved Hide resolved
Copy link
Collaborator

@henriquesimoes henriquesimoes left a comment

Choose a reason for hiding this comment

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

I was almost forgetting, but since v0.4.0 we should add an entry in CHANGES.md under Unreleased section indicating this PR under "New features".

@henriquesimoes
Copy link
Collaborator

henriquesimoes commented Nov 28, 2023

EDIT: that was just it. Does the build explicitly require the INCLUDES variable be defined?

No, it doesn't. It only appends its contents to USR_INCLUDES.

On the other hand, SSH must be defined, but it may be anything other than an empty string and it should also work.

README.md Outdated
Comment on lines 75 to 76
`Pmac` IOCs must include `libssh2-1` in `RUNTIME PACKAGES` at build,
because they are not integrated.
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
`Pmac` IOCs must include `libssh2-1` in `RUNTIME PACKAGES` at build,
because they are not integrated.
`Pmac` IOCs must include `libssh2-1` in the `RUNTIME PACKAGES`, because the module depends on it.


SSH = $(pkg-config --variable=prefix libssh2)
SSH_LIB = $(pkg-config --variable=libdir libssh2)
SSH_INCLUDE = -I$(pkg-config --variable=includedir libssh2)
Copy link
Member

Choose a reason for hiding this comment

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

In this case I'd either leave it as pkg-config --cflags-only-I libssh2 (the empty output might change on some other distro? who knows) or empty.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed. Having it set by pkg-config seems better for me.

BUILD_IOCS=NO
USE_GRAPHICSMAGICK=NO

SSH = $(pkg-config --variable=prefix libssh2)
Copy link
Member

Choose a reason for hiding this comment

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

And consider making this SSH=YES

Copy link
Collaborator

Choose a reason for hiding this comment

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

I've thought about that too. We should just remember that SSH=NO doesn't mean what it looks like =P.

@henriquesimoes henriquesimoes mentioned this pull request Nov 28, 2023
Compilation error in Pmac module with JOBS>1, probably due to badly
defined dependencies in the module's Makefile. We set JOBS=1 to be able
to build the module.
@ericonr ericonr merged commit da12b8c into cnpem:main Nov 29, 2023
1 check passed
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.

3 participants