Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

GLIBC_2.32 not found / CGO_ENABLED=0 #825

Open
4 tasks done
kaihendry opened this issue Mar 14, 2021 · 4 comments
Open
4 tasks done

GLIBC_2.32 not found / CGO_ENABLED=0 #825

kaihendry opened this issue Mar 14, 2021 · 4 comments

Comments

@kaihendry
Copy link

kaihendry commented Mar 14, 2021

Prerequisites

  • I am running the latest version. (up upgrade)
  • I searched to see if the issue already exists.
  • I inspected the verbose debug output with the -v, --verbose flag.
  • Are you an Up Pro subscriber?

Description

On Arch glibc is not compatible with AWS's. So the workaround is to use CGO_ENABLED=0

However CGO_ENABLED=0 often means poor support with sqlite drivers or example. CGO_ENABLED=0 versions of sqlite drivers exist but they are significantly slower for example.

Perhaps it's having some sort of cross compile option as suggest here https://twitter.com/benbjohnson/status/1370955506471165956 ?

Steps to Reproduce

Try deploy https://github.com/kaihendry/dfts

@tj
Copy link
Member

tj commented Mar 14, 2021

Hmm I'm not sure I'd want a dependency on Docker, it could get really complicated quick. I think that sort of thing is probably best left to CI like GH Actions where you're building in the target environment already, but something to think about for sure

@kaihendry
Copy link
Author

I'm told this what I need to do: https://gist.github.com/egonelbre/01bbf7ca97d6b5588438da36a2578e7b

I do really want a smooth way to deploy locally without CI.

@egonelbre
Copy link

I have no previous experience with apex/up, but as far as I'm able to deduce it seems that hooks.build is a way to override with arbitrary build command? So it should be possible to pretty much use the same invocation -- maybe modify it to output "server" as the binary. Although, I'm not sure in which computer/server context will run.

The only concern is invoking subcommands such as $(pwd) and $(go env GOPATH) within the command. Maybe it can invoke a separate script? Based on

up/up.go

Line 67 in 9770c50

cmd := exec.Command("sh", "-c", command)
, I'm guessing it will work?

@tj
Copy link
Member

tj commented Mar 15, 2021

@egonelbre yep it runs as a shell command, so you should be fine to use stuff like that

@kaihendry yeah I definitely hear you, but the number of variables explodes once you start introducing platform specifics. Using Docker manually locally and putting Up inside would more or less have the same UX as Up trying to use Docker, so I'm not sure there would be much of a benefit, since Up would have to support all the various OSes and shared libraries etc

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants