Skip to content

Update FreeBSD packaging script #443

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CodingCarpincho
Copy link
Contributor

We need to make two changes:

  • First, the package e2fsprogs-libuuid is no longer shipped and the standard libuuid is used instead. We should therefore update the package manifest to reflect this change in the dependencies.
  • Second, hard-coding package versions into the script is not very scaleable and will be a maintainence burden. Instead, we should ensure that the minimum package version required is whatever the build machine running this script has.

We need to make two changes:

- First, the package e2fsprogs-libuuid is no longer shipped and the
  standard libuuid is used instead. We should therefore update the
  package manifest to reflect this change in the dependencies.
- Second, hard-coding package versions into the script is not very
  scaleable and will be a maintainence burden. Instead, we should
  ensure that the minimum package version required is whatever the
  build machine running this script has.
MPDECIMAL_PKG_VERSION=$(get_package_version mpdecimal)
PYTHON_PKG_VERSION=$(get_package_version python311)
READLINE_PKG_VERSION=$(get_package_version readline)
SQLITE3_PKG_VERSION=$(get_package_version sqlite3)
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need SQLite? I thought we used swift-toolchain-sqlite now and thus do not need the system vended SQLite.

Choose a reason for hiding this comment

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

Well the idea for swift-toolchain-sqlite is that it's for systems without a native package management system to provide sqlite... meaning Windows and Android.

So far on Darwin we've been using the system SQLite and on Linux we've still been using the copy provided by the package manager... I expect it would make sense for FreeBSD to do the same as Linux here.


LIBUUID_PKG_VERSION=$(get_package_version libuuid)
LIBFFI_PKG_VERSION=$(get_package_version libffi)
LIBXML2_PKG_VERSION=$(get_package_version libxml2)
Copy link
Member

Choose a reason for hiding this comment

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

This one I am weary about. Can we pin this to the exact version? I learnt that this library is not ABI stable and does not follow standard versioning practices. We are pinned to the exact version of libxml2 on Windows as there were ABI changes that break FoundationXML.

Copy link
Contributor Author

@CodingCarpincho CodingCarpincho Jul 25, 2025

Choose a reason for hiding this comment

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

We've encountered this problem as well. I'd like Swift on FreeBSD to do a static link against this dependency, but @etcwilde would need to chime in as I don't think we can do static linking of the compiler.

Edit: It looks like the FreeBSD package repositories provide a libxml2.a alongside the dynamic libraries when you install the LibXML2 package. Perhaps it would be worth considering linking statically to that dependency on FreeBSD without statically linking the whole compiler.

},
"libffi": {
"version": "3.4.6",
"version": "$LIBFFI_PKG_VERSION",
Copy link
Member

Choose a reason for hiding this comment

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

I think libffi is needed only because of Python. I think we can just include the direct dependencies so the package manager can take care of the rest

"origin": "lang/python311"
},
"readline": {
"version": "8.2.13_2",
"version": "$READLINE_PKG_VERSION",
Copy link
Member

Choose a reason for hiding this comment

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

I think this is probably from Python too

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.

4 participants