GithubHelp home page GithubHelp logo

Comments (4)

miyagawa avatar miyagawa commented on September 25, 2024

So it seems that modules installed by Carton are compiled against my system perl instead of the one installed by plenv in my home directory.

That should not happen. You might either have perl in your $PATH pointing to a wrong path (i.e. system perl) or have a local::lib related environment variables set, affecting the installer to build and install modules using a wrong architecture.

Also, remove the local directory to start over Carton installation for each project. You can't switch versions once you build local directory with one version of perl.

I use plenv with carton/carmel all the time and should not cause this problem.

from plenv.

sharkyzz avatar sharkyzz commented on September 25, 2024

Please look into this:

$ plenv global
5.18.0
$ plenv shell
5.18.0

$ cat cpanfile
requires 'SOAP::Lite';

One of the requirements of SOAP-Lite is Net-SSLeay. If I look into the cpanm buildlog

...
Running Mkbootstrap for Net::SSLeay ()
chmod 644 SSLeay.bs
/usr/bin/perl "-Iinc" /usr/share/perl/5.20/ExtUtils/xsubpp -typemap /usr/share/perl/5.20/ExtUtils/typemap -typemap typemap SSLeay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c
cc -c -I/usr/include -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION="1.70" -DXS_VERSION="1.70" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.20/CORE" SSLeay.c
rm -f blib/arch/auto/Net/SSLeay/SSLeay.so
cc -shared -L/usr -L/usr/lib -L/usr/local/lib -fstack-protector SSLeay.o -o blib/arch/auto/Net/SSLeay/SSLeay.so
-L/usr -L/usr/lib -lssl -lcrypto -lz \
chmod 755 blib/arch/auto/Net/SSLeay/SSLeay.s
...

$ which cpanm
/home/developer/.plenv/shims/cpanm

$ plenv which cpanm
/home/developer/.plenv/versions/5.18.0/bin/cpanm

$ env
SHELL=/bin/bash
TERM=xterm
OLDPWD=/home/developer
USER=developer
MAIL=/var/mail/developer
PATH=/home/developer/.plenv/shims:/home/developer/.plenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
PWD=/home/developer/Perlbot
PLENV_VERSION=5.18.0
SHLVL=1
HOME=/home/developer
PLENV_SHELL=bash
LOGNAME=developer
_=/usr/bin/env

$ perl -v
This is perl 5, version 18, subversion 0 (v5.18.0) built for x86_64-linux

$ /usr/bin/perl -v
This is perl 5, version 20, subversion 2 (v5.20.2) built for x86_64-linux-gnu-thread-multi

from plenv.

sharkyzz avatar sharkyzz commented on September 25, 2024

Btw my last comment is based on a new install of Debian (8.1), so that's why the Perl versions differ from my initial comment. But the problem remains the same.

from plenv.

miyagawa avatar miyagawa commented on September 25, 2024

This has almost nothing to do with carton, and purely your plenv setup issue with cpanm.

You should be able to reproduce this without using carton at all, by just running cpanm -L /tmp/xyz Net::SSLeay and see where it gets installed to.

I think your shell setup is incomplete with plenv, and when you invoke a new shell $PATH gets reset to the one without ~/.plenv/shims which makes cpanm unable to run perl from the right plenv path.

If you're using plenv shell or some sort to localize the effect of plenv, that is not compatible to cpanm at all because it needs to invoke a new process via shell command when building a new module.

from plenv.

Related Issues (20)

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.