Package Details: mxnet 1.4.1-3

Git Clone URL: https://aur.archlinux.org/mxnet.git (read-only)
Package Base: mxnet
Description: Flexible and Efficient Library for Deep Learning
Upstream URL: http://mxnet.io/
Keywords: deep_learning deep_neural_networks distributed_systems machine_learning
Licenses: Apache
Submitter: Godisemo
Maintainer: petronny
Last Packager: petronny
Votes: 9
Popularity: 0.660501
First Submitted: 2017-02-11 00:12
Last Updated: 2019-06-25 09:57

Dependencies (25)

Sources (17)

Pinned Comments

petronny commented on 2019-06-21 08:00

And about this package, I've splitted it into mxnet{,-cuda,-mkl}. And it will take lots of time and space to compile.

The pre-built binaries of mxnet{,-cuda,-mkl} and their dependencies can be found in arch4edu.

Latest Comments

1 2 3 4 5 Next › Last »

zottelef commented on 2019-07-17 08:30

@petronny: after many years using R and installing packages from source I feel numb.

I added the three lines, but the following error still persists:

In file included from im2rec.cc:41:
/usr/include/opencv4/opencv2/opencv.hpp:48:10: fatal error: opencv2/opencv_modules.hpp: No such file or directory
   48 | #include "opencv2/opencv_modules.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

petronny commented on 2019-07-11 05:50

@zottelef Adding these 3 lines before R CMD INSTALL R-package:

echo "PKG_CXXFLAGS+=$(CFLAGS)" >> R-package/src/Makevars
sed '1i#define CV_IMWRITE_PNG_COMPRESSION cv::IMWRITE_PNG_COMPRESSION' -i R-package/src/im2rec.cc
sed '1i#define CV_IMWRITE_JPEG_QUALITY cv::IMWRITE_JPEG_QUALITY' -i R-package/src/im2rec.cc

under rpkg: in Makefile should work.

I can't find a file like mxnet_0.5.tar.gz to install, but I think mxnet has been installed. I can pass the tests with make rpkgtest.

zottelef commented on 2019-07-08 07:12

There is still and error with the R CMD INSTALL R-package:

im2rec.cc:39:10: fatal error: opencv2/opencv.hpp: No such file or directory
   39 | #include <opencv2/opencv.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Prepending opencv4 to the /home/fabio/.cache/pikaur/build/mxnet/src/mxnet/R-package/src/im2rec.cc

gives this error:

In file included from im2rec.cc:39:
/usr/include/opencv4/opencv2/opencv.hpp:48:10: fatal error: opencv2/opencv_modules.hpp: No such file or directory
   48 | #include "opencv2/opencv_modules.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

but I cannot find the file that calls opencv2/opencv_modules.hpp and prepend opencv4. opencv_modules.hpp and opencv.hpp are in /usr/include/opencv4/opencv2/ (on my computer)

petronny commented on 2019-07-05 11:13

@zottelef I've looked into the R support.

At last, the document asks you to run

make rpkg

which is

rpkg:
        mkdir -p R-package/inst/libs
        cp src/io/image_recordio.h R-package/src
        cp -rf lib/libmxnet.so R-package/inst/libs
        mkdir -p R-package/inst/include
        cp -rf include/* R-package/inst/include
        cp -rf 3rdparty/dmlc-core/include/* R-package/inst/include/
        cp -rf 3rdparty/tvm/nnvm/include/* R-package/inst/include
        Rscript -e "if(!require(devtools)){install.packages('devtools', repo = 'https://cloud.r-project.org/')}"
        Rscript -e "library(devtools); library(methods); options(repos=c(CRAN='https://cloud.r-project.org/')); install_deps(pkg='R-package', dependencies = TRUE)"
        cp R-package/dummy.NAMESPACE R-package/NAMESPACE
        echo "import(Rcpp)" >> R-package/NAMESPACE
        R CMD INSTALL R-package
        Rscript -e "if (!require('roxygen2')||packageVersion('roxygen2') < '5.0.1'){\
            devtools::install_version('roxygen2',version='5.0.1',\
            repos='https://cloud.r-project.org/',quiet=TRUE)}"
        Rscript -e "require(mxnet); mxnet:::mxnet.export('R-package'); warnings()"
        rm R-package/NAMESPACE
        Rscript -e "require(roxygen2); roxygen2::roxygenise('R-package'); warnings()"
        R CMD INSTALL R-package

So if you have lib/libmxnet.so I think there is no need to compile libmxnet.so youself. Could you try skip the build and use the libmxnet.so in the prebuilt binaires?

Packaging r-mxnet is a sort of nightmare to me since almost all r-* things are in AUR and I have to add them into my repository before packaging r-mxnet. But some of them are orphaned and maybe not well-maintained so I don't really want to add them into my repository. So could you try a local installation without building libmxnet.so first?

zottelef commented on 2019-06-26 09:18

@petronny I am now using the pre-built binaries. However, since I would like to build the R package (as said before) I must compile libmxnet.so locally and then add the commands I share with you.

petronny commented on 2019-06-26 06:55

@zottelef Well, I guess something has changed in vtk 8.2.0-4 which is now in [community-testing].

I will fix this when vtk 8.2.0-4 moves to [community]. For now you can build it with extra-x86_64-build or use the pre-built binaries which are also built with extra-x86_64-build.

zottelef commented on 2019-06-25 11:47

@petronny

gcc7 7.4.1+20181207-4 vtk 8.2.0-4

petronny commented on 2019-06-25 07:26

@zottelef I just built mxnet in my build system last night with no error.

Which version of vtk and gcc are you using? I've checked the log of the build system. It is building against vtk-8.2.0-3 and gcc7-7.4.1+20181207-4.

BTW, I've updated the link to pre-built binaries.

zottelef commented on 2019-06-25 07:12

A new error raised (vtk related): /usr/bin/ld: /usr/lib/libvtkIOExport.so.1: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26' collect2: error: ld returned 1 exit status make: *** [Makefile:526: bin/im2rec] Error 1

zottelef commented on 2019-06-21 08:06

@petronny do not be in an hurry and take you time, man! Thanks for your work so far. It is highly appreciated. R packages it would be "thick gravy goodness"! :-)