Hello,
We're hitting some issues with dynamic library dependencies of a lambda deployed via this library.
I included as much details as I could gather (sorry if it's too much). Any help on this would be appreciated 😃
When I deploy the lambda by running npx sls deploy
and do a test run of it in AWS, I'm getting the following error:
START RequestId: 07ef6bc4-ef85-49bf-82eb-8a73a1e313c3 Version: $LATEST
./r-executor-cleanup: /lib64/libldap_r-2.4.so.2: no version information available (required by /var/task/libpq.so.5)
./r-executor-cleanup: /lib64/libm.so.6: version `GLIBC_2.23' not found (required by /var/task/libquadmath.so.0)
END RequestId: 07ef6bc4-ef85-49bf-82eb-8a73a1e313c3
REPORT RequestId: 07ef6bc4-ef85-49bf-82eb-8a73a1e313c3 Duration: 26.71 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 6 MB
RequestId: 07ef6bc4-ef85-49bf-82eb-8a73a1e313c3 Error: Runtime exited with error: exit status 1 Runtime.ExitError
The lambda looks like this so far (but the binary has all our required haskell dependencies)
module Our.Module.Name where
import AWSLambda (lambdaMain)
import Data.Aeson (Value)
lambda :: IO ()
lambda = lambdaMain cleanupHandler
cleanupHandler :: Value -> IO ()
cleanupHandler _ = putTextLn "TODO implement me"
build environment
We tested building the lambda in couple of environments, each time the error we got when running Test in aws was the same:
- Linux 5.8.8, Fedora 32
- Linux 5.4.62, NixOS 21.03
- MacOS
We're building our project using stack lts-16.2,
we tried both with serverless-haskell 0.11.3 (included in the lts-16.2 snapshot) as well as with the latest version from hackage (0.12.1 - added to stack.yaml inside extra-deps
)
Our package.json looks like this:
package.json
{
"name": "pi-haskell-lambdas",
"version": "0.1.0",
"description": "Config for building and deploying haskell lambdas via serverless framework",
"directories": {
"test": "test"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"serverless": "^1.83.0",
"serverless-haskell": "^0.12.1"
}
}
Addition info + things we tried:
As for the two .so files mentioned in the error log:
libpq.so.5 - is dependency of postgresql-simple that we're using
libquadmath.so.0 - this is dependency of some of the linear algebra / machine learning libs our app is using
Which files end up in the .serverless/r-executor-cleanup.zip ?
$ unzip .serverless/r-executor-cleanup.zip
$ ldd r-executor-cleanup # This is our main binary packaged in the zip
linux-vdso.so.1 (0x00007ffc1b37f000)
libm.so.6 => /lib64/libm.so.6 (0x00007fedba2e3000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fedba2c1000)
libpq.so.5 => /lib64/libpq.so.5 (0x00007fedba270000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007fedba26b000)
libblas.so.3 => /lib64/libblas.so.3 (0x00007fedba214000)
liblapack.so.3 => /lib64/liblapack.so.3 (0x00007fedb9b69000)
libgsl.so.19 => not found
libgslcblas.so.0 => /lib64/libgslcblas.so.0 (0x00007fedb9b24000)
libz.so.1 => /lib64/libz.so.1 (0x00007fedb9b0a000)
librt.so.1 => /lib64/librt.so.1 (0x00007fedb9aff000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fedb9af8000)
libgmp.so.10 => /lib64/libgmp.so.10 (0x00007fedb9a61000)
libc.so.6 => /lib64/libc.so.6 (0x00007fedb9895000)
/lib64/ld-linux-x86-64.so.2 (0x00007fedba449000)
libssl.so.1.1 => /lib64/libssl.so.1.1 (0x00007fedb97fe000)
libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x00007fedb9511000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007fedb94ba000)
libldap_r-2.4.so.2 => /lib64/libldap_r-2.4.so.2 (0x00007fedb9460000)
libgfortran.so.5 => /lib64/libgfortran.so.5 (0x00007fedb9195000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007fedb90a8000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007fedb908f000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fedb9088000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007fedb9076000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fedb906f000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fedb9055000)
liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007fedb9042000)
libsasl2.so.3 => /lib64/libsasl2.so.3 (0x00007fedb9022000)
libquadmath.so.0 => /lib64/libquadmath.so.0 (0x00007fedb8fd8000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fedb8fbd000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fedb8f90000)
libcrypt.so.2 => /lib64/libcrypt.so.2 (0x00007fedb8f53000)
libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007fedb8eba000)
What version of GLIBC do the ".so" files depend on?
$ for binary in r-executor-cleanup *.so.*; do echo $binary; objdump -T $binary | grep -o -E 'GLIBC_[0-9.]+' | sort -u; done
r-executor-cleanup
GLIBC_2.10
GLIBC_2.12
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.4
GLIBC_2.7
GLIBC_2.8
libasn1.so.8
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.8
libblas.so.3
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.4
GLIBC_2.4
libcrypto.so.1.0.0
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.7
libcrypt.so.1
GLIBC_2.14
GLIBC_2.2.5
libgfortran.so.3
GLIBC_2.14
GLIBC_2.17
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.6
GLIBC_2.7
libgnutls.so.30
GLIBC_2.14
GLIBC_2.15
GLIBC_2.17
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.8
libgslcblas.so.0
GLIBC_2.2.5
GLIBC_2.3.4
libgsl.so.19
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.7
libgssapi.so.3
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.4
GLIBC_2.8
libhcrypto.so.4
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.7
libheimbase.so.1
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.8
libheimntlm.so.0
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.4
libhogweed.so.4
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.4
libhx509.so.5
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.8
libidn.so.11
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.4
libkrb5.so.26
GLIBC_2.14
GLIBC_2.15
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.7
GLIBC_2.8
liblapack.so.3
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.4
liblber-2.4.so.2
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.4
GLIBC_2.4
libldap_r-2.4.so.2
GLIBC_2.12
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.4
GLIBC_2.4
libnettle.so.6
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3.4
GLIBC_2.4
libpq.so.5
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.4
GLIBC_2.4
libquadmath.so.0
GLIBC_2.10
GLIBC_2.14
GLIBC_2.23
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.4
GLIBC_2.4
libroken.so.18
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.8
libsasl2.so.2
GLIBC_2.14
GLIBC_2.15
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.4
GLIBC_2.4
libsqlite3.so.0
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3.4
GLIBC_2.4
libssl.so.1.0.0
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3.4
GLIBC_2.4
libwind.so.0
GLIBC_2.14
GLIBC_2.2.5
GLIBC_2.3.4
GLIBC_2.4
Where do the .so files, that end up in the zip package come from?
I added some logging between these 2 lines and this is what I get as part of npx sls package
:
output
$ npx sls package
Serverless: Building handler r-executor-cleanup with Stack...
# ...
# stack build log omitted
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libpq.so.5 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libpq.so.5
Serverless: Running stack exec cp /usr/lib/libblas.so.3 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libblas.so.3
Serverless: Running stack exec cp /usr/lib/liblapack.so.3 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/liblapack.so.3
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libgsl.so.19 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libgsl.so.19
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libgslcblas.so.0 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libgslcblas.so.0
Serverless: Running stack exec cp /lib/x86_64-linux-gnu/libssl.so.1.0.0 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libssl.so.1.0.0
Serverless: Running stack exec cp /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libcrypto.so.1.0.0
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libldap_r-2.4.so.2
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libgfortran.so.3 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libgfortran.so.3
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/liblber-2.4.so.2
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libsasl2.so.2 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libsasl2.so.2
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libgssapi.so.3 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libgssapi.so.3
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libgnutls.so.30 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libgnutls.so.30
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libquadmath.so.0 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libquadmath.so.0
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libheimntlm.so.0
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libkrb5.so.26 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libkrb5.so.26
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libasn1.so.8 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libasn1.so.8
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libhcrypto.so.4
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libroken.so.18 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libroken.so.18
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libidn.so.11 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libidn.so.11
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libnettle.so.6 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libnettle.so.6
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libhogweed.so.4 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libhogweed.so.4
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libwind.so.0 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libwind.so.0
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libheimbase.so.1 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libheimbase.so.1
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libhx509.so.5 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libhx509.so.5
Serverless: Running stack exec cp /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libsqlite3.so.0
Serverless: Running stack exec cp /lib/x86_64-linux-gnu/libcrypt.so.1 /home/jhrcek/Devel/github.com/Holmusk/PI/backend/libcrypt.so.1
Serverless: Packaging service...
The issue is reproducible locally
When I run npx sls invoke local -f r-executor-cleanup
locally
I see an active docker container, which seems to be doing nothing (for 30 minutes).
docker ps -a --no-trunc
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cfdb5dcd255da7edbbdd25cc0f5769aa6f99278493406df80befc0003e7d93a4 sls-docker-provided "/var/runtime/init ./r-executor-cleanup \"\"" 58 seconds ago Up 57 seconds distracted_blackburn
And when I do docker kill <CONTAINER_ID>
the following appears in terminal, where I executed the above command:
output
Serverless: Packaging service...
# At this point I execute `docker kill...`
./r-executor-cleanup: /lib64/libldap_r-2.4.so.2: no version information available (required by /var/task/libpq.so.5)
./r-executor-cleanup: /lib64/libm.so.6: version `GLIBC_2.23' not found (required by /var/task/libquadmath.so.0)
Error --------------------------------------------------
Error: Failed to run docker for provided image (exit code 137})
at /home/jhrcek/Devel/github.com/Holmusk/PI/backend/node_modules/serverless/lib/plugins/aws/invokeLocal/index.js:537:21
at processTicksAndRejections (internal/process/task_queues.js:97:5)
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: linux
Node Version: 12.16.1
Framework Version: 1.83.0 (local)
Plugin Version: 3.8.4
SDK Version: 2.3.1
Components Version: 2.34.9
Note that this corresponds to the error we're getting when testing the lambda in AWS console.
Only the same versions of the serverless plugin and the Haskell package are guaranteed to work. Updating the one means updating the other. Need to:
- Document this
- In serverless plugin, check the Haskell package version (
stack list-dependencies --depth 1 | grep serverless-haskell
)
I followed the instructions,
stack new mypackage https://raw.githubusercontent.com/seek-oss/serverless-haskell/master/serverless-haskell.hsfiles
cd mypackage
npm install
stack build
sls invoke local -f mypackage-func
and got this,
Cannot read property 'schema' of undefined
Here is the SLS debug info,
sls invoke local -f mypackage-func
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Type Error ---------------------------------------------
Cannot read property 'schema' of undefined
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Stack Trace --------------------------------------------
TypeError: Cannot read property 'schema' of undefined
at new ServerlessPlugin (/Users/vifo/git/mypackage/node_modules/serverless-haskell/dist/index.js:115:35)
at PluginManager.addPlugin (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:62:28)
at /usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:102:14
at Array.forEach (<anonymous>)
at PluginManager.loadPlugins (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:98:13)
at PluginManager.loadServicePlugins (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:151:10)
at PluginManager.loadAllPlugins (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:94:10)
at /usr/local/lib/node_modules/serverless/lib/Serverless.js:72:26
From previous event:
at Serverless.init (/usr/local/lib/node_modules/serverless/lib/Serverless.js:70:8)
at /usr/local/lib/node_modules/serverless/bin/serverless:42:21
at processImmediate (internal/timers.js:461:21)
From previous event:
at /usr/local/lib/node_modules/serverless/bin/serverless:28:46
at Object.<anonymous> (/usr/local/lib/node_modules/serverless/bin/serverless:65:4)
at Module._compile (internal/modules/cjs/loader.js:1076:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:941:32)
at Function.Module._load (internal/modules/cjs/loader.js:782:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
OS: darwin
Node Version: 14.12.0
Serverless Version: 1.43.0
I am opening this issue with the hopes of resolving this issue or updating the readme docs with steps to avert this issue for future users.
I had been thinking about trying to write a wrapper process based on a node extension to address #24 and #26 but that involved a lot of strange chicanery, especially as we'd have a C shim between Node and Haskell, so it'd get gross.
If we can bind to the new C++ runtime API that seems like the easiest and best route to a genuinely native Haskell runtime.
If no one else is working on this, I'm inclined to take a shot at it, especially if it can all be done through ctypes. My inclination is to write a separate package that calls into the API rather than adding to this, unless it winds up needing some of the types already nicely defined here.
Any thoughts?
The readme is good, but it doesn't explain what happens during deploy
. Which ghc version is being used? Is ghci used? Which build systems are used? Cabal or stack?
Hello, thanks for great tool, I'm trying to launch some test project with it and have encountered the problem with Node environment, the error is:
START RequestId: 61730031-fc71-11e7-bc7b-35986d9cfc05 Version: $LATEST
Syntax error in module 'serverless-lambda-test': SyntaxError
const arguments = options['arguments'];
^
SyntaxError: Identifier 'arguments' has already been declared
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
END RequestId: 61730031-fc71-11e7-bc7b-35986d9cfc05
REPORT RequestId: 61730031-fc71-11e7-bc7b-35986d9cfc05 Duration: 5.87 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 21 MB
As I understand this happened because arguments
is reserved word in Javascript, so we cannot declare const
with a such name :)
If it matters I have used Node runtime 6.10 and default settings/project from README.md (so to reproduce it is enough to go through all steps from README.md).
Hi
Can't work out quite what's going on but after upgrading from 11.3 -> 12.5 I get this:
Type Error ---------------------------------------------
TypeError: Cannot read property 'schema' of undefined
at new ServerlessPlugin (/home/nick/workspace/HASKELL/sloganator.hs/node_modules/serverless-haskell/dist/index.js:115:35)
at PluginManager.addPlugin (/home/nick/workspace/HASKELL/sloganator.hs/node_modules/serverless/lib/classes/PluginManager.js:78:28)
at /home/nick/workspace/HASKELL/sloganator.hs/node_modules/serverless/lib/classes/PluginManager.js:115:31
at Array.forEach (<anonymous>)
at PluginManager.loadAllPlugins (/home/nick/workspace/HASKELL/sloganator.hs/node_modules/serverless/lib/classes/PluginManager.js:115:8)
at /home/nick/workspace/HASKELL/sloganator.hs/node_modules/serverless/lib/Serverless.js:96:35
...etc..
with
Your Environment Information ---------------------------
Operating System: linux
Node Version: 15.2.1
Framework Version: 1.67.3
Plugin Version: 3.8.4
SDK Version: 2.3.2
Components Version: 2.34.9
After downgrading it seems to stop (this, at least) in 0.12.3 so maybe the schema validation did something? I've checked the docs.
Starting from Stack 1.7, stack list-dependencies
is deprecated in favor of stack ls dependencies
:
Hello,
I am trying to run the example project on macOS Mojave (10.14.04).
I am getting the following error:
uk05182:haskelllambda jakob$ stack install
serverless-haskell-0.8.7: configure
serverless-haskell-0.8.7: build
Progress 1/2
-- While building package serverless-haskell-0.8.7 using:
/Users/jakob/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.4 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.4.0.1 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
Logs have been written to: /Users/jakob/private_projects/haskelllambda/.stack-work/logs/serverless-haskell-0.8.7.log
Configuring serverless-haskell-0.8.7...
Preprocessing library for serverless-haskell-0.8.7..
Building library for serverless-haskell-0.8.7..
[ 1 of 13] Compiling AWSLambda.Events.Records ( src/AWSLambda/Events/Records.hs, .stack-work/dist/x86_64-osx/Cabal-2.4.0.1/build/AWSLambda/Events/Records.o )
<command line>: can't load .so/.DLL for: /Users/jakob/.stack/snapshots/x86_64-osx/lts-13.19/8.6.4/lib/x86_64-osx-ghc-8.6.4/libHSzlib-0.6.2-BdOecmQ0rL1HOiGypdSgxY-ghc8.6.4.dylib (dlopen(/Users/jakob/.stack/snapshots/x86_64-osx/lts-13.19/8.6.4/lib/x86_64-osx-ghc-8.6.4/libHSzlib-0.6.2-BdOecmQ0rL1HOiGypdSgxY-ghc8.6.4.dylib, 5): Symbol not found: _deflateEnd
Referenced from: /Users/jakob/.stack/snapshots/x86_64-osx/lts-13.19/8.6.4/lib/x86_64-osx-ghc-8.6.4/libHSzlib-0.6.2-BdOecmQ0rL1HOiGypdSgxY-ghc8.6.4.dylib
Expected in: flat namespace
in /Users/jakob/.stack/snapshots/x86_64-osx/lts-13.19/8.6.4/lib/x86_64-osx-ghc-8.6.4/libHSzlib-0.6.2-BdOecmQ0rL1HOiGypdSgxY-ghc8.6.4.dylib)
My steps:
- Clone project
- Change resolver in
stack.yml
to lts-13.19
- Execute
stack build
or stack install
(both fail)
I tried using lts-13.11
but ran into the same issue.
It would be good to document whether this project is restricted to aws lambda or if all serverless cloud providers are supported (and which ones are tested).
Hey there - first off: thanks for this nice techology.
Unfortunately I now spent two hours and could not get it to work. I tried cloning the example project and creating one from scratch. I always run into the following error:
~/example-project
❯ sls invoke local -f hello
Serverless: Package version mismatch: NPM: 0.7.5, Stack: 0.6.7. Versions must be in sync to work correctly. Please install matching versions of NPM and Stack packages by either pinning your NPM version to match stack, or adding an extra-dep in your stack.yaml to match the NPM version.
Error --------------------------------------------------
Package version mismatch.
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information -----------------------------
OS: linux
Node Version: 8.12.0
Serverless Version: 1.32.0
Note: I am fairly new to haskell development.
I tried
- adding
extra-dep
to stack.yaml
but the npm package was not found in the registry. Downgrading to an old version of NPM was not straightforward plus I do not get why the version of NPM would be relevant. Is the message maybe referring to NodeJS rather than NPM?
- Why do I need a realy old version of stack for this to work?
It would be nice if the example project would be working with the latest or modern versions of stack and node.
- I could not find documentation on the error message.
- I have no clue what to sync with what as I could not find configuration pointing to the versions mentioned in the error message.
Recommend Projects
-
-
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
An Open Source Machine Learning Framework for Everyone
-
The Web framework for perfectionists with deadlines.
-
A PHP framework for web artisans
-
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
Some thing interesting about web. New door for the world.
-
A server is a program made to process requests and deliver data to clients.
-
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Some thing interesting about visualization, use data art
-
Some thing interesting about game, make everyone happy.
-
Recommend Org
-
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Open source projects and samples from Microsoft.
-
Google ❤️ Open Source for everyone.
-
Alibaba Open Source for everyone
-
Data-Driven Documents codes.
-
China tencent open source team.
-