Skip to content

Clients unable to build project due to unsafe flags. - #6

Closed
FoxClock wants to merge 3 commits into
vkuttyp:mainfrom
FoxClock:BuildFix
Closed

Clients unable to build project due to unsafe flags. #6
FoxClock wants to merge 3 commits into
vkuttyp:mainfrom
FoxClock:BuildFix

Conversation

@FoxClock

Copy link
Copy Markdown
Contributor

The inclusion of unsafe flags causes swift's package manager to fail compilation.
It complains of the use of unsafe flags in the build process. The target for building the release version

I have stripped out the unsafe flags in the product.

The Readme should also be amended so that the requirement for pkg-config is made explicitly known.
As it is not shipped on all MacOS versions, at least not the machine this was tested on (macos 26 x86_64)

This does compile with swift build.
I have not stripped the test out. As i could not get that target to compile without the unsafe flags. This should not break the CI pipeline this time.

@vkuttyp vkuttyp left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Good find — the unsafeFlags problem is real. SPM blocks packages with unsafe flags from being used as dependencies, so this needs a proper fix. However, removing the flags without an alternative breaks the build because the compiler can no longer find the FreeTDS headers.
The correct solution is to replace the CSybdb regular target with a systemLibrary target, which uses pkg-config to locate FreeTDS at build time — no hardcoded paths and no unsafeFlags needed. I'll implement this directly on main. Please close this PR and I'll tag a 1.1.0 once the fix is in.

…w's prefix method to search for the headers.

Check if this works on linux?
@FoxClock

Copy link
Copy Markdown
Contributor Author

That is a good plan, my next commit here is on the right path. But I missed that swift PM does not resolve bash variables.

Ill close and await a 1.1

@FoxClock FoxClock closed this Feb 22, 2026
@vkuttyp

vkuttyp commented Feb 22, 2026

Copy link
Copy Markdown
Owner

The fix is now live. Have look.

@vkuttyp

vkuttyp commented Feb 22, 2026 via email

Copy link
Copy Markdown
Owner

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.

2 participants