Closed adamcrussell closed 7 years ago
@adamcrussell Did you install swig via brew ? brew install swig seems like your swig setup is incomplete. The perl binding can certainly be compiled on OSX Sierra, not sure about El Capitan but I think they should.
yes, I definitely have swig installed. I just confirmed that the swig binary is installed and it's in my $PATH.
I just did a make clean and rebuilt and no swig bindings are being built. Should perl5.swg be built during the build of the shared library? where is this specified in the build configuration files? I can't seem to see any mention of it.
@adamcrussell perl5.swg is a part of the swig distribution. looks like your swig installation does not have proper perl support ? this is an example of travis test for the perl build on OSX https://s3.amazonaws.com/archive.travis-ci.org/jobs/252115415/log.txt?X-Amz-Expires=30&X-Amz-Date=20170718T175945Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJRYRXRSVGNKPKO5A/20170718/us-east-1/s3/aws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=edd8b3333475d162c0eed923b2642f9b92d5dd92740b6072f9fc63d75a73b2a9
Sergey-Kolychev:~ sergeykolychev$ locate perl5.swg /usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perl5.swg
@adamcrussell are you using brew or mac ports ? macports seems to have per language packaging http://blog.jdlh.com/en/2015/01/25/pycdio_install_error_swig/ if you're using macports try 'sudo port install swig-perl'
@sergeykolychev thanks! that was indeed the problem. you're right, I am using macports. after port install swig-perl
the problem was resolved and I have no built all the Perl modules.
@adamcrussell cool, thanks, I'll update the docs with this case.
@adamcrussell can you please close this issue ?
I have the same problem on MacOS M1 Ventura 13.1. after installing swing-perl with macports I get the following:
cpan[1]> install AI::MXNetCAPI
Reading '/Users/marcont/.cpan/Metadata'
Database was generated on Thu, 12 Jan 2023 19:17:01 GMT
Running install for module 'AI::MXNetCAPI'
Checksum for /Users/marcont/.cpan/sources/authors/id/S/SK/SKOLYCHEV/AI-MXNetCAPI-1.5.tar.gz ok
Scanning cache /Users/marcont/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring S/SK/SKOLYCHEV/AI-MXNetCAPI-1.5.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning (mostly harmless): No library found for -lmxnet
Generating a Unix-style Makefile
Writing Makefile for AI::MXNetCAPI
Writing MYMETA.yml and MYMETA.json
SKOLYCHEV/AI-MXNetCAPI-1.5.tar.gz
/opt/local/bin/perl5.34 Makefile.PL -- OK
Running make for S/SK/SKOLYCHEV/AI-MXNetCAPI-1.5.tar.gz
cp lib/AI/MXNetCAPI.pm blib/lib/AI/MXNetCAPI.pm
Running Mkbootstrap for MXNetCAPI ()
chmod 644 "MXNetCAPI.bs"
"/opt/local/bin/perl5.34" -MExtUtils::Command::MM -e 'cp_nonempty' -- MXNetCAPI.bs blib/arch/auto/AI/MXNetCAPI/MXNetCAPI.bs 644
/usr/bin/cc -c -I../../include/mxnet -fno-common -DPERL_DARWIN -pipe -Os -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV -O3 -DVERSION=\"1.5\" -DXS_VERSION=\"1.5\" "-I/opt/local/lib/perl5/5.34/darwin-thread-multi-2level/CORE" mxnet_wrap.cxx
mxnet_wrap.cxx:1626:10: fatal error: 'c_api.h' file not found
^~~~~~~~~
1 error generated. make: *** [mxnet_wrap.o] Error 1 SKOLYCHEV/AI-MXNetCAPI-1.5.tar.gz /usr/bin/make -- NOT OK Failed during this command: SKOLYCHEV/AI-MXNetCAPI-1.5.tar.gz : make NO
For bugs or installation issues, please provide the following information. The more information you provide, the more likely people will be able to help you.
Environment info
Operating System: OS X 10.11.6
Compiler: Apple LLVM version 7.0.2 (clang-700.1.81)
Package used (Python/R/Scala/Julia): Perl
MXNet version:
Or if installed from source:
MXNet commit hash (
git rev-parse HEAD
): 897cc55a0ffd53317628bbccadea34b072228937If you are using python package, please provide
Python version and distribution: n/a
If you are using R package, please provide
R
sessionInfo()
: n/aError Message:
Please paste the full error message, including stack trace.
$ perl Makefile.PL INSTALL_BASE=${HOME}/perl5 :3: Error: Unable to find 'perl5.swg' mxnet.i:3: Error: Unable to find 'typemaps.i' Warning: -L../../lib changed to -L/Users/arussel7/Projects/mxnet/perl-package/AI-MXNetCAPI/../../lib Generating a Unix-style Makefile Writing Makefile for AI::MXNetCAPI Writing MYMETA.yml and MYMETA.json
Minimum reproducible example
if you are using your own code, please provide a short script that reproduces the error.
Steps to reproduce
or if you are running standard examples, please provide the commands you have run that lead to the error. simply following the instructions at http://mxnet.io/get_started/osx_setup.html I built the mxnet library successfuly but it seems that the swig bindings were not built.
What have you tried to solve it?
I looked through the buildfiles to see where this may be an option that was not included in the build or some similar issue but to no avail.