Code Monkey home page Code Monkey logo

Comments (5)

maclema avatar maclema commented on May 28, 2024

Thanks for bringing this to our attention. It looks like we've forgot to commit package-lock.json. In addition to updating the package.json versions we'll also work to update all the dependencies and fix any compile errors.

In the meantime, below is a package.json you can use instead of the repo version with the exact versions of dependencies which successfully build/test/deploy.

{
  "name": "iot-static-ip-endpoints",
  "version": "1.0.0",
  "license": "Apache-2.0",
  "bin": {
    "cdk-solution": "bin/app.js"
  },
  "scripts": {
    "cleanup": "tsc --build ./ --clean && rm -rf node_modules && rm -f package-lock.json",
    "clean": "rm -rf coverage/ lib/*.js lib/*.d.ts bin/*.js bin/*.d.ts test/*.js test/*.d.ts test/*.synth.json",
    "build": "tsc",
    "watch": "tsc -w",
    "test": "jest",
    "cdk": "cdk",
    "lint": "npx eslint --max-warnings=0 .",
    "full-build": "npx eslint && npm run build && npm run test && cdk synth",
    "full-build-prod": "npm run build && cdk synth",
    "check": "npm run build && cdk synth",
    "configure": "node configure.js",
    "nag": "npm run build && cdk synth > iot-static-ip-endpoints.yaml && cfn_nag iot-static-ip-endpoints.yaml"
  },
  "devDependencies": {
    "@aws-cdk/assert": "1.88.0",
    "@types/jest": "26.0.20",
    "@types/node": "14.14.25",
    "@typescript-eslint/eslint-plugin": "4.14.2",
    "@typescript-eslint/parser": "4.14.2",
    "aws-cdk": "1.88.0",
    "eslint": "7.19.0",
    "jest": "26.6.3",
    "source-map-support": "0.5.19",
    "ts-jest": "26.5.0",
    "ts-node": "9.1.1",
    "typescript": "4.1.3"
  },
  "dependencies": {
    "@aws-cdk/aws-autoscaling": "1.88.0",
    "@aws-cdk/aws-ec2": "1.88.0",
    "@aws-cdk/aws-elasticloadbalancingv2": "1.88.0",
    "@aws-cdk/aws-events-targets": "1.88.0",
    "@aws-cdk/aws-globalaccelerator": "1.88.0",
    "@aws-cdk/aws-lambda": "1.88.0",
    "@aws-cdk/aws-s3": "1.88.0",
    "@aws-cdk/core": "1.88.0",
    "@aws-cdk/custom-resources": "1.88.0",
    "aws-sdk": "2.830.0"
  },
  "prettier": {
    "tabWidth": 2,
    "semi": false,
    "printWidth": 150,
    "trailingComma": "none"
  }
}

from iot-static-ip-endpoints.

stvius avatar stvius commented on May 28, 2024

Thank you for the prompt response.

I used the package.json you provided above; now I got a new error. Below is the error part of the output:

`====================================
This is Python runtime

Collecting cryptography==3.3.1 (from -r requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/7c/b6/1f3dd48a22fcd56f19e6cfa95f74ff0a64b046306354e1bd2b936b7c9ab4/cryptography-3.3.1-cp36-abi3-manylinux1_x86_64.whl
Collecting cffi>=1.12 (from cryptography==3.3.1->-r requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/00/9e/92de7e1217ccc3d5f352ba21e52398372525765b2e0c4530e6eb2ba9282a/cffi-1.15.0.tar.gz
Collecting six>=1.4.1 (from cryptography==3.3.1->-r requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.12->cryptography==3.3.1->-r requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl
Installing collected packages: pycparser, cffi, six, cryptography
Running setup.py install for cffi ... error
Complete output from command /usr/bin/python3.8 -u -c "import setuptools, tokenize;file='/tmp/pip-build-o2umzas3/cffi/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-mnj5zld4-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmpxoae0ae2:
unable to execute 'gcc': No such file or directory
unable to execute 'gcc': No such file or directory

    No working compiler found, or bogus compiler options passed to
    the compiler from Python's standard "distutils" module.  See
    the error messages above.  Likely, the problem is not related
    to CFFI but generic to the setup.py of any Python package that
    tries to compile C code.  (Hints: on OS/X 10.8, for errors about
    -mno-fused-madd see http://stackoverflow.com/questions/22313407/
    Otherwise, see https://wiki.python.org/moin/CompLangPython or
    the IRC channel #python on irc.libera.chat.)

    Trying to continue anyway.  If you are trying to install CFFI from
    a build done in a different context, you can ignore this warning.

running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.8/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/c
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python3.8 -u -c "import setuptools, tokenize;file='/tmp/pip-build-o2umzas3/cffi/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-mnj5zld4-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmpxoae0ae2" failed with error code 1 in /tmp/pip-build-o2umzas3/cffi/`

Please advise

from iot-static-ip-endpoints.

gadams999 avatar gadams999 commented on May 28, 2024

Can you list the command that causes the error, and anything leading up to the error?

from iot-static-ip-endpoints.

maclema avatar maclema commented on May 28, 2024

Looks like you'll need a gcc compiler and python libraries. Try running these commands to install these prior to building:

sudo yum -y groupinstall 'Development Tools'
sudo yum -y install python38-devel libffi-devel

Also be aware. When you deploy the stack using CloudFormation. The template URL should have a . after s3 before the region, and not a dash:

Example:

--template-url=https://${BUCKET_NAME_PREFIX}-${AWS_REGION}.s3.${AWS_REGION}.amazonaws.com/${SOLUTION_TRADEMARKEDNAME}/v${VERSION}/${SOLUTION_TRADEMARKEDNAME}.template

from iot-static-ip-endpoints.

gadams999 avatar gadams999 commented on May 28, 2024

Stale issue, closing.

from iot-static-ip-endpoints.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.