Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make onnc failed #11

Closed
HKLee2040 opened this issue Sep 6, 2018 · 10 comments
Closed

Make onnc failed #11

HKLee2040 opened this issue Sep 6, 2018 · 10 comments

Comments

@HKLee2040
Copy link

Follow your step:
./build.sh dbg /opt/onnc

but meet the following error message:

/bin/bash ../../libtool --tag=CXX --mode=link g++ -std=c++14 -g -O2 -o onnc main.o ONNCApp.o ONNCConfig.o -L/home/walker/onnc/onnc-master/build-dbg/lib /home/walker/onnc/onnc-master/build-dbg/lib/libonnc.a -lprotobuf -pthread -lpthread /home/walker/onnc/onnc-master/onncroot/lib/libonnx.a /home/walker/onnc/onnc-master/onncroot/lib/libonnx_proto.a -lpthread /home/walker/onnc/onnc-master/onncroot/lib/libskypat.a -lglog -lprotobuf -lpthread -lz
libtool: link: g++ -std=c++14 -g -O2 -o onnc main.o ONNCApp.o ONNCConfig.o -pthread -L/home/walker/onnc/onnc-master/build-dbg/lib /home/walker/onnc/onnc-master/build-dbg/lib/libonnc.a /home/walker/onnc/onnc-master/onncroot/lib/libonnx.a /home/walker/onnc/onnc-master/onncroot/lib/libonnx_proto.a /home/walker/onnc/onnc-master/onncroot/lib/libskypat.a -lglog -lprotobuf -lpthread -lz -pthread
/home/walker/onnc/onnc-master/build-dbg/lib/libonnc.a(BM188xBackend.o): In function onnc::Lower* onnc::LowerRegistry::emplace<onnc::MulLower>()': /home/walker/onnc/onnc-master/src/include/onnc/Transforms/TensorSel/LowerRegistry.h:60: undefined reference to onnc::MulLower::MulLower()'
collect2: error: ld returned 1 exit status
Makefile:455: recipe for target 'onnc' failed
make[2]: *** [onnc] Error 1
make[2]: Leaving directory '/home/walker/onnc/onnc-master/build-dbg/tools/onnc'
Makefile:406: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/walker/onnc/onnc-master/build-dbg/tools'
Makefile:530: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
[/home/walker/onnc/onnc-master/build-dbg] Make onnc failed.
Failed to execute command: 'make DESTDIR=/home/walker/onnc/onnc-master/install-dbg install'

@LuisHsu
Copy link
Contributor

LuisHsu commented Sep 6, 2018

Sophon target no longer supports automake building system, but the building commands haven't been cleaned in master branch.

I made ONNC/onnc#59 and requested for review.

During the pending time, you may like to use ./build.cmake.sh.

The usage is as same as ./build.sh but driven with CMake instead.

@HKLee2040
Copy link
Author

I use "./build.cmake.sh", but meet another trouble:
Do I miss any dependency library?

-- Found BISON: /usr/bin/bison (found version "3.0.4")
-- Found FLEX: /usr/bin/flex (found version "2.6.0")
CMake Error at tools/onnx2tg/CMakeLists.txt:9 (find_package):
Could not find a package configuration file provided by "LLVM" with any of
the following names:

LLVMConfig.cmake
llvm-config.cmake

Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
"LLVM_DIR" to a directory containing one of the above files. If "LLVM"
provides a separate development package or SDK, be sure it has been
installed.

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ONNX_LIBRARIE_onnx
linked by target "libonnc" in directory /home/walker/onnc/onnc-master/src/lib
ONNX_LIBRARIE_onnx_proto
linked by target "libonnc" in directory /home/walker/onnc/onnc-master/src/lib
SKYPAT_LIBRARIES
linked by target "libskypat_main" in directory /home/walker/onnc/onnc-master/src/tools/unittests

-- Configuring incomplete, errors occurred!
See also "/home/walker/onnc/onnc-master/build-dbg/CMakeFiles/CMakeOutput.log".
See also "/home/walker/onnc/onnc-master/build-dbg/CMakeFiles/CMakeError.log".

@LuisHsu
Copy link
Contributor

LuisHsu commented Sep 7, 2018

Let me fix it......

@LuisHsu
Copy link
Contributor

LuisHsu commented Sep 7, 2018

ONNC/onnc#59 has been checked in, and I successfully built with ./build.sh script.

I'll still fixing ./build.cmake.sh, but you can give ./build.sh a try.

Sorry for the inconvenience and thanks you for unearth the bugs.

@HKLee2040
Copy link
Author

I got the "success" with some errors.
Does it matter?

[/media/walker/DATA/work/onnc/onnc-umbrella/build-dbg] leave
[/media/walker/DATA/work/onnc/onnc-umbrella] building onnc-umbrella tools...
[/media/walker/DATA/work/onnc/onnc-umbrella] create build directory at '/media/walker/DATA/work/onnc/onnc-umbrella/build-dbg/umbrella/tools'
[/media/walker/DATA/work/onnc/onnc-umbrella/build-dbg/umbrella/tools] building tools: 'onnx-as'
make: Entering directory '/media/walker/DATA/work/onnc/onnc-umbrella/tools/onnx-as'
g++ -std=c++14 -DONNX_NAMESPACE=onnx -o /media/walker/DATA/work/onnc/onnc-umbrella/build-dbg/umbrella/tools/onnx-as/onnx-as -I/media/walker/DATA/work/onnc/onnc-umbrella/install-dbg/opt/onnc/include -I/media/walker/DATA/work/onnc/onnc-umbrella/onncroot/include -L/media/walker/DATA/work/onnc/onnc-umbrella/install-dbg/opt/onnc/lib -L/media/walker/DATA/work/onnc/onnc-umbrella/onncroot/lib -lonnc -lonnx -lonnx_proto -lprotobuf main.cpp
main.cpp:8:37: fatal error: onnc/Option/CommandLine.h: No such file or directory
compilation terminated.
Makefile:13: recipe for target '/media/walker/DATA/work/onnc/onnc-umbrella/build-dbg/umbrella/tools/onnx-as/onnx-as' failed
make: *** [/media/walker/DATA/work/onnc/onnc-umbrella/build-dbg/umbrella/tools/onnx-as/onnx-as] Error 1
make: Leaving directory '/media/walker/DATA/work/onnc/onnc-umbrella/tools/onnx-as'
[/media/walker/DATA/work/onnc/onnc-umbrella/build-dbg/umbrella/tools] building tools: 'onnx-dis'
make: Entering directory '/media/walker/DATA/work/onnc/onnc-umbrella/tools/onnx-dis'
g++ -std=c++14 -DONNX_NAMESPACE=onnx -o /media/walker/DATA/work/onnc/onnc-umbrella/build-dbg/umbrella/tools/onnx-dis/onnx-dis -I/media/walker/DATA/work/onnc/onnc-umbrella/install-dbg/opt/onnc/include -I/media/walker/DATA/work/onnc/onnc-umbrella/onncroot/include -L/media/walker/DATA/work/onnc/onnc-umbrella/install-dbg/opt/onnc/lib -L/media/walker/DATA/work/onnc/onnc-umbrella/onncroot/lib -lonnc -lonnx -lonnx_proto -lprotobuf main.cpp
main.cpp:10:37: fatal error: onnc/Option/CommandLine.h: No such file or directory
compilation terminated.
Makefile:13: recipe for target '/media/walker/DATA/work/onnc/onnc-umbrella/build-dbg/umbrella/tools/onnx-dis/onnx-dis' failed
make: *** [/media/walker/DATA/work/onnc/onnc-umbrella/build-dbg/umbrella/tools/onnx-dis/onnx-dis] Error 1
make: Leaving directory '/media/walker/DATA/work/onnc/onnc-umbrella/tools/onnx-dis'
[/media/walker/DATA/work/onnc/onnc-umbrella/install-dbg/opt] packaging tarball '/media/walker/DATA/work/onnc/onnc-umbrella/onnc-master.tar.gz'
[/media/walker/DATA/work/onnc/onnc-umbrella] build /media/walker/DATA/work/onnc/onnc-umbrella/onnc-master.tar.gz for installation on /opt/onnc: success

@LuisHsu
Copy link
Contributor

LuisHsu commented Sep 10, 2018

It seems like you lost include/onnc/Option/CommandLine.h in onnc source directory.

You can remove build-dbg and src.

Let the ./build.sh script download and compile the source again.

@HKLee2040
Copy link
Author

It still doesn't work.
Actually, I find CommandLine.h in the folder already, i.e., include/onnc/Option/

@LuisHsu
Copy link
Contributor

LuisHsu commented Sep 10, 2018

I made 2 PRs, both of them will fix it.

ONNC/onnc#65
#13

Let's waiting for review, or you can give these patches a try.

@HKLee2040
Copy link
Author

Yes, it works!
Thanks

@LuisHsu LuisHsu closed this as completed Sep 12, 2018
@avirala6
Copy link

how to solve this error??

  • make -j8 install
    : not foundumbrella/src/cmake/config.guess: 6: /onnc/onnc-umbrella/src/cmake/config.guess:
    : not foundumbrella/src/cmake/config.guess: 8: /onnc/onnc-umbrella/src/cmake/config.guess:
    : not foundumbrella/src/cmake/config.guess: 28: /onnc/onnc-umbrella/src/cmake/config.guess:
    : not foundumbrella/src/cmake/config.guess: 29: /onnc/onnc-umbrella/src/cmake/config.guess:
    : not foundumbrella/src/cmake/config.guess: 40: /onnc/onnc-umbrella/src/cmake/config.guess:
    : not foundumbrella/src/cmake/config.guess: 42: /onnc/onnc-umbrella/src/cmake/config.guess:
    : not foundumbrella/src/cmake/config.guess: 54: /onnc/onnc-umbrella/src/cmake/config.guess:
    : not foundumbrella/src/cmake/config.guess: 65: /onnc/onnc-umbrella/src/cmake/config.guess:
    : not foundumbrella/src/cmake/config.guess: 68: /onnc/onnc-umbrella/src/cmake/config.guess:
    /onnc/onnc-umbrella/src/cmake/config.guess: 71: /onnc/onnc-umbrella/src/cmake/config.guess: Syntax error: word unexpected (expecting "in")
    CMake Error at cmake/check.cmake:35 (message):
    Failed to execute /onnc/onnc-umbrella/src/cmake/config.guess
    Call Stack (most recent call first):
    CMakeLists.txt:114 (include)

-- Configuring incomplete, errors occurred!
See also "/onnc/onnc-umbrella/build-normal/CMakeFiles/CMakeOutput.log".
See also "/onnc/onnc-umbrella/build-normal/CMakeFiles/CMakeError.log".
Makefile:1202: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1

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

No branches or pull requests

3 participants