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

Add support for static linking #22

Merged
merged 13 commits into from Nov 5, 2019
Merged

Conversation

@palfrey
Copy link
Contributor

palfrey commented Oct 31, 2019

Enable support for static linking with the feature flag static. This aids the building of single binaries with no system dependencies on systems that support static linking with Rust (e.g. particularly alpine, but theoretically others).

@pacman82

This comment has been minimized.

Copy link
Owner

pacman82 commented Nov 3, 2019

Hi, thanks for your contribution! Can you make the tests pass, and give me a short tl;dr of what you did?

@palfrey

This comment has been minimized.

Copy link
Contributor Author

palfrey commented Nov 3, 2019

Hi, thanks for your contribution! Can you make the tests pass, and give me a short tl;dr of what you did?

I've just updated the description with the tl;dr of what it is, and I'll be adding some comments to specific items on why they're there as some of them are non-obvious. On the tests passing:

  • Ubuntu: now working with the bionic update, as the xenial version of unixodbc didn't properly support static linking.
  • OS X: currently blocked on an upstream issue in Homebrew that I'm working on getting fixed found how to deal with.
  • Windows: I think the problem is that the path to the library is wrong, but I need to boot back up my test Windows system and see if I can have another shot at that. The Appveyor information on what's installed where is a little sparse, and so I'm having to attempt to reconstruct bits of it, add a path and see if it suceeds. I've disabled static linking entirely for the Windows build, as I'm not convinced it's doable. OTOH, odbc is part of the Windows core libraries as best I can tell, so it shouldn't be an obstacle to making portable binaries.
@@ -17,7 +26,7 @@ matrix:
rust: beta
before_install: |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew install unixodbc
HOMEBREW_NO_AUTO_UPDATE=1 brew install unixodbc

This comment has been minimized.

Copy link
@pacman82

pacman82 Nov 5, 2019

Owner

That would make a great comment for the travis file itself.

This comment has been minimized.

Copy link
@palfrey

palfrey Nov 5, 2019

Author Contributor

Done

appveyor.yml Outdated Show resolved Hide resolved
@palfrey palfrey changed the title [WIP] Add support for static linking Add support for static linking Nov 4, 2019
@@ -1,4 +1,5 @@
sudo: false
dist: bionic

This comment has been minimized.

Copy link
@palfrey

palfrey Nov 4, 2019

Author Contributor

Xenial had an older version of unixodbc that didn't support static linking properly.

Copy link
Owner

pacman82 left a comment

Great work!

@@ -17,7 +26,7 @@ matrix:
rust: beta
before_install: |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew install unixodbc
HOMEBREW_NO_AUTO_UPDATE=1 brew install unixodbc

This comment has been minimized.

Copy link
@pacman82

pacman82 Nov 5, 2019

Owner

That would make a great comment for the travis file itself.

@pacman82 pacman82 merged commit 402bb42 into pacman82:master Nov 5, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@palfrey palfrey deleted the palfrey:static-linking branch Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.