Skip to content

Meson support#666

Open
ringlej wants to merge 2 commits into
stephane:masterfrom
gridpoint-com:meson-support
Open

Meson support#666
ringlej wants to merge 2 commits into
stephane:masterfrom
gridpoint-com:meson-support

Conversation

@ringlej

@ringlej ringlej commented Nov 8, 2022

Copy link
Copy Markdown

This adds support to build using meson build
Porting over all of the autotools to meson including unit tests

@cla-bot

cla-bot Bot commented Nov 8, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

1 similar comment
@cla-bot

cla-bot Bot commented Nov 8, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

@cla-bot

cla-bot Bot commented Nov 8, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

1 similar comment
@cla-bot

cla-bot Bot commented Nov 8, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

@cla-bot

cla-bot Bot commented Nov 8, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

@cla-bot

cla-bot Bot commented Nov 8, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

@cla-bot

cla-bot Bot commented Nov 8, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

@cla-bot

cla-bot Bot commented Nov 8, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

@ringlej

ringlej commented Nov 8, 2022

Copy link
Copy Markdown
Author

I added .github/workflows/meson-build.yml to build and test via meson

@cla-bot

cla-bot Bot commented Nov 8, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

@cla-bot

cla-bot Bot commented Nov 8, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

@cla-bot

cla-bot Bot commented Nov 8, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

Comment thread .gitignore Outdated
Comment thread src/meson.build Outdated
Comment on lines +20 to +23
lt_current = 6
lt_revision = 0
lt_age = 1
lt_version = '@0@.@1@.@2@'.format(lt_current, lt_age, lt_revision)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

libtool version actually maps a bit funky to regular versions, the math for it is (C - A).(A).(R).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Interesting. I changed it to:

lt_current = 6
lt_revision = 0
lt_age = 1
lt_version = '@0@.@1@.@2@'.format(lt_current - lt_age, lt_age, lt_revision)

and I get the following files created:

lrwxrwxrwx 1 jringle domain users     14 Nov  8 23:58  libmodbus.so -> libmodbus.so.6*
-rwxr-xr-x 1 jringle domain users 121176 Nov  8 23:58  libmodbus.so.5.1.0*
lrwxrwxrwx 1 jringle domain users     18 Nov  8 23:58  libmodbus.so.6 -> libmodbus.so.5.1.0*

Is this correct?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Well, you need one more small tweak I just mentioned below.

Comment thread src/meson.build Outdated
Comment thread tests/meson.build Outdated
Comment thread src/meson.build Outdated
Comment on lines +26 to +27
version: lt_version,
soversion: lt_current,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If you drop the soversion definition, Meson will default to using the first component of the version, which is usually what people want (and is compatible with autotools).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I feel like I'm missing understanding something... What's the point of doing (C - A).(A).(R) if (C) never gets used on its own? Why not just make C=5 and just do (C).(A).(R)?

@cla-bot

cla-bot Bot commented Nov 9, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

@cla-bot

cla-bot Bot commented Nov 9, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

1 similar comment
@cla-bot

cla-bot Bot commented Nov 9, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

@cla-bot

cla-bot Bot commented Nov 9, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

@cla-bot

cla-bot Bot commented Nov 9, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

@cla-bot

cla-bot Bot commented Nov 9, 2022

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

@stephane stephane self-assigned this Nov 28, 2022
@yegorich

Copy link
Copy Markdown
Contributor

@stephane what is the status of this PR? What is still missing?

@ringlej could you rebase this PR on top of master?

@ringlej

ringlej commented Mar 28, 2024

Copy link
Copy Markdown
Author

Why is a rebase needed?
The PR consists entirely of new files

@yegorich

Copy link
Copy Markdown
Contributor

This way other users can build the current code without git cherry-picking.

@yegorich

yegorich commented Apr 1, 2024

Copy link
Copy Markdown
Contributor

Thanks for rebasing. I tested this PR with both meson 0.61.2 and also meson's git master branch. Everything is working as expected and I saw no meson warnings.

As meson support can be provided alongside the autoconf, can we merge it and note that this is a new experimental build system?

@stephane

Copy link
Copy Markdown
Owner

@yegorich I think it's a good approach.

@yegorich

Copy link
Copy Markdown
Contributor

@stephane great. Then, let's move this PR forward.

@yegorich

Copy link
Copy Markdown
Contributor

@stephane gentle ping :-)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants