Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

amalgamation compile error : /amalgamation/python/../../lib/libmxnet_predict.so: undefined symbol: shm_unlink #14808

Open
jeehyun100 opened this issue Apr 26, 2019 · 8 comments

Comments

@jeehyun100
Copy link

Note: Providing complete information in the most concise form is the best way to get help. This issue template serves as the checklist for essential information to most of the technical issues and bug reports. For non-technical issues and feature requests, feel free to present the information in what you believe is the best form.

For Q & A and discussion, please start a discussion thread at https://discuss.mxnet.io

Description

(Brief description of the problem in no more than 2 sentences.)
I compile mxnet amalgamation on ubuntu 16.04.
I test mxnet_predict_example.py when loading from mxnet_predict import Predictor, load_ndarray_file errors raise up

error : amalgamation/python/../../lib/libmxnet_predict.so: undefined symbol: shm_unlink

It was no error with amalgamation compile

How do i fix it. Melp me

Environment info (Required)

:ubuntu 16.04

What to do:
1. Download the diagnosis script from https://raw.githubusercontent.com/apache/incubator-mxnet/master/tools/diagnose.py
2. Run the script using `python diagnose.py` and paste its output here.

Package used (Python/R/Scala/Julia):
(I'm using ...)

For Scala user, please provide:

  1. Java version: (java -version)
  2. Maven version: (mvn -version)
  3. Scala runtime if applicable: (scala -version)

For R user, please provide R sessionInfo():

Build info (Required if built from source)

Compiler (gcc/clang/mingw/visual studio): gcc

MXNet commit hash: master
(Paste the output of git rev-parse HEAD here.)

Build config:
I had no change with master branch
and go to amalgamation/make
That is it.

Error Message:

error : amalgamation/python/../../lib/libmxnet_predict.so: undefined symbol: shm_unlink

Minimum reproducible example

(If you are using your own code, please provide a short script that reproduces the error. Otherwise, please provide link to the existing example.)

Steps to reproduce

(Paste the commands you ran that produced the error.)

  1. git clone --recursive https://github.com/apache/incubator-mxnet mxnet
    cd mxnet
  2. cd amalgamation
  3. make

What have you tried to solve it?

@mxnet-label-bot
Copy link
Contributor

Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.
Here are my recommended labels: Build

@jeehyun100
Copy link
Author

I put -lpthread -ldl -lrt in Makefile.
Error message was chage.
Check failed: reg != nullptr Cannot find pass MXPlanMemory in the registry

@lanking520
Copy link
Member

@jeehyun100 You may need to make the backend before you run the make here. Try make at the root folder

@jeehyun100
Copy link
Author

I builded libmxnet.so on root directory. Loading libmxnet.so is ok. The prediction is ok.
But in ./amalgamation directory to make libmxnet_prediction.so , It has a problem.
I got the same error, undefined symbol: shm_unlink. Anyone help me? T_T

@lanking520
Copy link
Member

Hi @jeehyun100 I can reproduce your issue on my VM:

ldd -r libmxnet_predict.so
	linux-vdso.so.1 =>  (0x00007ffc3f5a3000)
	libopenblas.so.0 => /usr/lib/libopenblas.so.0 (0x00007f5b8c81f000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5b8c49d000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5b8c194000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5b8bf7e000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5b8bbb4000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f5b90f23000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5b8b997000)
	libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f5b8b66c000)
	libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f5b8b42d000)
undefined symbol: shm_unlink	(./libmxnet_predict.so)
undefined symbol: shm_open	(./libmxnet_predict.so)

Step to reproduce:
On clean 16.04 VM

git clone --recursive https://github.com/apache/incubator-mxnet mxnet
cd mxnet
make -j$(nproc) USE_BLAS=openblas
cd amalgamation
make

@hcho3 Could you please help if you are familiar?

@hcho3
Copy link
Contributor

hcho3 commented Apr 30, 2019

@lanking520 The -lrt flag should be added, according to the Makefile:
https://github.com/dmlc/dmlc-core/blob/649be18a8c55c48517861d67158a45dec54992ee/make/dmlc.mk#L35

Can you post the verbose log of the compilation? Let's check if -lrt is being added.

@nchafni
Copy link

nchafni commented Jun 4, 2019

hey guys any updates on this issue? I just hit the same problem, @jeehyun100 were you able to solve it?

@adis300
Copy link
Contributor

adis300 commented Jun 20, 2019

I hit the same problem.

Looked into the issue. amalgamation creates nnvm.d using ${mxnet_root}/3rdparty/tvm/nnvm/src/pass/plan_memory.cc the graph_executor wants to use ${mxnet_root}/src/nnvm/plan_memory.cc

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants