Skip to content

Add support for Linux platform#152

Merged
jillesvangurp merged 9 commits into
jillesvangurp:masterfrom
szaffarano:szaffarano/linux-support
Nov 25, 2024
Merged

Add support for Linux platform#152
jillesvangurp merged 9 commits into
jillesvangurp:masterfrom
szaffarano:szaffarano/linux-support

Conversation

@szaffarano

Copy link
Copy Markdown
Contributor

Fixes #151

What I did was:

  • Uncommented the gradle config code
  • Include a small logic to add linker options (only for Linux source sets) relying on the LDFLAG environment variable.
  • Add an actual class, KtorRestClient.linux.kt that uses Curl
  • A few small changes to the build.gradle file removing warnings.
  • I'm not sure whether it should be included in this PR (or should be included at all), but I also added a small Nix flake to facilitate having a dev environment.

I only tested it (and it works pretty well, with no issues so far) on LinuxX64, both locally (my dev environment uses NixOS) and on docker images.

@jillesvangurp

Copy link
Copy Markdown
Owner

Thanks for fixing this!

@jillesvangurp

Copy link
Copy Markdown
Owner

Still not passing in CI unfortunately, any ideas on how to fix this?

Run sudo apt-get install libcurl4-openssl-dev
Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
  libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev
The following NEW packages will be installed:
  libcurl4-openssl-dev
0 upgraded, 1 newly installed, 0 to remove and 33 not upgraded.
Need to get 386 kB of archives.
After this operation, 1698 kB of additional disk space will be used.
Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [142 B]
Ign:2 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libcurl4-openssl-dev amd64 7.81.0-1ubuntu1.18
Ign:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libcurl4-openssl-dev amd64 7.81.0-1ubuntu1.18
Ign:2 http://security.ubuntu.com/ubuntu jammy-updates/main amd64 libcurl4-openssl-dev amd64 7.81.0-1ubuntu1.18
Err:2 mirror+file:/etc/apt/apt-mirrors.txt jammy-updates/main amd64 libcurl4-openssl-dev amd64 7.81.0-1ubuntu1.18
  404  Not Found [IP: 40.81.13.82 80]
E: Failed to fetch mirror+file:/etc/apt/apt-mirrors.txt/pool/main/c/curl/libcurl4-openssl-dev_7.81.0-1ubuntu1.18_amd64.deb  404  Not Found [IP: 40.81.13.82 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Error: Process completed with exit code 100.

@jillesvangurp

Copy link
Copy Markdown
Owner

Also not really liking the nix/flake dependency. Can you get rid of that?

@jillesvangurp

Copy link
Copy Markdown
Owner

can you merge master? I removed the bit that attempts to install libcurl headers. Not sure if that is still needed for Linux support but wasn't working in any case.

@szaffarano

szaffarano commented Nov 25, 2024

Copy link
Copy Markdown
Contributor Author

can you merge master? I removed the bit that attempts to install libcurl headers. Not sure if that is still needed for Linux support but wasn't working in any case.

oh, I've just pushed another change installing libcurl, because indeed it's needed. Also, I've removed the nixos-related stuff (added the files to .gitignore to be able to use them in my local copy)

@jillesvangurp jillesvangurp merged commit 652ca60 into jillesvangurp:master Nov 25, 2024
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.

[FEAT] Add linux support

2 participants