Compilation error: "recompile with -fPIC "
Personne n'a encore pris cette issue.
- Langage dominant
- JavaScript
- Étoiles
- 5.8k
- Forks
- 704
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Hello there,
Thank you for making such an awesome library. I'm currently using nodegit on a project and tried without much success to build nodegit from termux on Android:
apt update
apt upgrade
apt install nodejs git
apt install g++ make python lib curl-dev openssl libssh
npm install nodegit
I ended up with this stacktrace:
/data/data/com.termux/files/usr/bin/ld: Release/obj.target/vendor/openssl/openssl.a(v3_extku.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol EXTENDED_KEY_USAGE_it' which may bind externally can not be used when making a shared object; recompile with -fPIC Release/obj.target/vendor/openssl/openssl.a(v3_extku.o): In function EXTENDED_KEY_USAGE_free': v3_extku.c:(.text+0x1bc): dangerous relocation: unsupported relocation clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [nodegit.target.mk:278: Release/obj.target/nodegit.node] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Linux 3.18.31-perf-g4ec23d9 gyp ERR! command "/data/data/com.termux/files/usr/bin/node" "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/data/data/com.termux/files/home/nuage/node_modules/nodegit/build/Release/nodegit.node" "--module_name=nodegit" "--module_path=/data/data/com.termux/files/home/nuage/node_modules/nodegit/build/Re
I'm not sure how I can recompile with -fPIC without editing some files coming from npm. Can you advise?
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par reproduire le build de npm install nodegit sur Termux/Android et inspectez le nodegit.target.mk généré ainsi que la sortie de build de node-gyp mentionnée dans le rapport. Déterminez quelle dépendance native produit l’objet non-PIC, puis vérifiez que le build se termine correctement dans l’environnement signalé.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- android, cpp, javascript, node.js
- Domaine
- build-system, mobile-dev
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100