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

Meson support #666

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

Meson support #666

wants to merge 2 commits into from

Conversation

ringlej
Copy link

@ringlej ringlej commented Nov 8, 2022

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

@cla-bot
Copy link

cla-bot bot commented Nov 8, 2022

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
Copy link

cla-bot bot commented Nov 8, 2022

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
Copy link

cla-bot bot commented Nov 8, 2022

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
Copy link

cla-bot bot commented Nov 8, 2022

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
Copy link

cla-bot bot commented Nov 8, 2022

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
Copy link

cla-bot bot commented Nov 8, 2022

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
Copy link

cla-bot bot commented Nov 8, 2022

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
Copy link

cla-bot bot commented Nov 8, 2022

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
Copy link
Author

ringlej commented Nov 8, 2022

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

@cla-bot
Copy link

cla-bot bot commented Nov 8, 2022

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
Copy link

cla-bot bot commented Nov 8, 2022

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
Copy link

cla-bot bot commented Nov 8, 2022

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...

.gitignore Outdated Show resolved Hide resolved
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)

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
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?

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.

src/meson.build Outdated Show resolved Hide resolved
tests/meson.build Outdated Show resolved Hide resolved
src/meson.build Outdated
Comment on lines 26 to 27
version: lt_version,
soversion: lt_current,

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
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
Copy link

cla-bot bot commented Nov 9, 2022

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
Copy link

cla-bot bot commented Nov 9, 2022

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
Copy link

cla-bot bot commented Nov 9, 2022

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
Copy link

cla-bot bot commented Nov 9, 2022

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
Copy link

cla-bot bot commented Nov 9, 2022

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
Copy link

cla-bot bot commented Nov 9, 2022

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
Contributor

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

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

@ringlej
Copy link
Author

ringlej commented Mar 28, 2024

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

@yegorich
Copy link
Contributor

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

@yegorich
Copy link
Contributor

yegorich commented Apr 1, 2024

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?

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.

None yet

4 participants