Code Monkey home page Code Monkey logo

Comments (3)

ftian1 avatar ftian1 commented on July 24, 2024

pls manully apply below patch to solve ubuntu build issue.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3f1477c..df60102 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,9 +30,7 @@ add_definitions(-DCAFFE_VERSION=${CAFFE_TARGET_VERSION})
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)

include(ExternalProject)
-if(MSVC)
include(GNUInstallDirs)
-endif()

include(cmake/Utils.cmake)
include(cmake/Targets.cmake)
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
index 3e3eae4..76cdd02 100644
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@ -276,11 +276,7 @@ else()
set(MKLDNN_LIBRARIES_NAME "libmkldnn.so")
endif()

-if(APPLE OR WIN32)
-set(LIBDIR lib)
-else()
-set(LIBDIR lib64)
-endif()
+set(LIBDIR ${CMAKE_INSTALL_LIBDIR})

if(DEFINED ENV{MKLDNNROOT})

from caffe.

lsyang1111 avatar lsyang1111 commented on July 24, 2024

Thanks for your response!

So there should be two modifications, right? One is /CMakeLists.txt, another is /cmake/Dependencies.cmake.
But I only find one line difference in Dependencies.cmake file.
After modify this line, the error phenomena is the same.

(1)
add_definitions(-DCAFFE_VERSION=${CAFFE_TARGET_VERSION})

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)

include(ExternalProject)
if(MSVC)
include(GNUInstallDirs)
endif()

include(cmake/Utils.cmake)
include(cmake/Targets.cmake)

(2)
if(MSVC)
set(MKLDNN_LIBRARIES_NAME "mkldnn.lib")
else()
set(MKLDNN_LIBRARIES_NAME "libmkldnn.so")
endif()

if(APPLE OR WIN32)
set(LIBDIR lib)
else()
set(LIBDIR lib64)
endif()
set(LIBDIR ${CMAKE_INSTALL_LIBDIR}) ######## I only add this line

if(DEFINED ENV{MKLDNNROOT})

from caffe.

ftian1 avatar ftian1 commented on July 24, 2024

+include(GNUInstallDirs)
in CMakeLists.txt after include(ExternalProject)

from caffe.

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.