Comments (8)
Hey there @pmixer, you beat us to it. :) We're working on adding simple Makefiles in #75---hopefully that will be merged very soon (like, next couple days).
For your particular case, the command you are using looks to be correct. So I'm not sure what the error is. Can you paste more output? I might be able to help diagnose the issue. π
from examples.
Hey there @pmixer, you beat us to it. :) We're working on adding simple Makefiles in #75---hopefully that will be merged very soon (like, next couple days).
For your particular case, the command you are using looks to be correct. So I'm not sure what the error is. Can you paste more output? I might be able to help diagnose the issue. π
Hi Ryan, thx for the quick reply, the error report is too long, full of boost linking failure report, βthe complie command looks okayβ should be informative enough for fixing it, THX! Iβll try to get it fixed and update later(gdm3 just failed again after re-installed nvidia driverβ¦)
from examples.
π probably the last 5 to 10 lines would be sufficient.
Have fun with the nvidia drivers. I have certainly shouted at my computer quite a lot while debugging why gdm3 doesn't come up... π
from examples.
just uninstalled the driver and switched to lightdm π
lol, yes, nvidia-drivers+gdm3 might be the best combination for improving one's computer fixing skills.
FYI, here are last few lines output:
/tmp/cc1M5oAR.o: In function `void boost::archive::basic_text_oprimitive<std::ostream>::save_impl<boost::archive::tracking_type>(boost::archive::tracking_type const&, mpl_::bool_<false>&)':
mnist_simple.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE9save_implINS0_13tracking_typeEEEvRKT_RN4mpl_5bool_ILb0EEE[_ZN5boost7archive21basic_text_oprimitiveISoE9save_implINS0_13tracking_typeEEEvRKT_RN4mpl_5bool_ILb0EEE]+0x77): undefined reference to `boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code, char const*, char const*)'
mnist_simple.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE9save_implINS0_13tracking_typeEEEvRKT_RN4mpl_5bool_ILb0EEE[_ZN5boost7archive21basic_text_oprimitiveISoE9save_implINS0_13tracking_typeEEEvRKT_RN4mpl_5bool_ILb0EEE]+0x95): undefined reference to `boost::archive::archive_exception::~archive_exception()'
mnist_simple.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE9save_implINS0_13tracking_typeEEEvRKT_RN4mpl_5bool_ILb0EEE[_ZN5boost7archive21basic_text_oprimitiveISoE9save_implINS0_13tracking_typeEEEvRKT_RN4mpl_5bool_ILb0EEE]+0xdf): undefined reference to `boost::archive::archive_exception::~archive_exception()'
/tmp/cc1M5oAR.o: In function `void boost::archive::save_access::save_primitive<boost::archive::binary_oarchive, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(boost::archive::binary_oarchive&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
mnist_simple.cpp:(.text._ZN5boost7archive11save_access14save_primitiveINS0_15binary_oarchiveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_RKT0_[_ZN5boost7archive11save_access14save_primitiveINS0_15binary_oarchiveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_RKT0_]+0x18): undefined reference to `boost::archive::detail::basic_oarchive::end_preamble()'
mnist_simple.cpp:(.text._ZN5boost7archive11save_access14save_primitiveINS0_15binary_oarchiveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_RKT0_[_ZN5boost7archive11save_access14save_primitiveINS0_15binary_oarchiveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_RKT0_]+0x2f): undefined reference to `boost::archive::basic_binary_oprimitive<boost::archive::binary_oarchive, char, std::char_traits<char> >::save(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/tmp/cc1M5oAR.o:(.data.rel.local.DW.ref._ZTIN5boost7archive17archive_exceptionE[DW.ref._ZTIN5boost7archive17archive_exceptionE]+0x0): undefined reference to `typeinfo for boost::archive::archive_exception'
collect2: error: ld returned 1 exit status
as my dev environment is far from clean
, might be a special issue.
from examples.
Hmm, is it possible that the boost header includes you are using differ from the libboost_serialization.so
you are linking from? I see -lboost_serialization
in the command, which looks fine, and it looks like the compiler found the Boost headers just fine for inclusion, but I suspect maybe there are multiple versions of Boost installed on the system or something? I'm not 100% sure, but maybe it's an avenue to look at at least.
(I also switched to lightdm at some point; fewer problems...)
from examples.
maybe, I'll try to get a clean environment for testing. I guessed it's multi version of boost problem but it still happens after uninstalled cisco anyconnect(the only one using it's own libboost*) πΏ .
BTW, I'm always surrounded by these kinds of wried issues, will report back later once fixed.
(yes, lightdm much better, BTW, pls do not use newest nvidia driver if it's not necessary, try 418.88 instead... just fixed the issue by installing another version π€¦ )
from examples.
Update, I modified the Makefile based on #75 as:
# This is a simple Makefile used to build the example source code.
# This example might requires some modifications in order to work correctly on
# your system.
# If you're not using the Armadillo wrapper, replace `armadillo` with linker commands
# for the BLAS and LAPACK libraries that you are using.
TARGET := mnist_simple
SRC := mnist_simple.cpp
LIBS_NAME := armadillo mlpack boost_serialization
CXX := g++
CXXFLAGS += -std=c++11 -Wall -Wextra -O3 -DNDEBUG -fopenmp
# Use these CXXFLAGS instead if you want to compile with debugging symbols and without optimizations.
# CXXFLAGS += -std=c++11 -Wall -Wextra -g -O0
LDFLAGS := -fopenmp
LDFLAGS += -L/home/pmixer/Downloads/gsoc/mlpack/build/lib
INCLFLAGS := -I/home/pmixer/Downloads/gsoc/ensmallen/include
INCLFLAGS += -I/home/pmixer/Downloads/gsoc/mlpack/build/include
CXXFLAGS += $(INCLFLAGS)
OBJS := $(SRC:.cpp=.o)
LIBS := $(addprefix -l,$(LIBS_NAME))
CLEAN_LIST := $(TARGET) $(OBJS)
# default rule
default: all
$(TARGET): $(OBJS)
$(CXX) $(OBJS) -o $(TARGET) $(LDFLAGS) $(LIBS)
.PHONY: all
all: $(TARGET)
.PHONY: clean
clean:
@echo CLEAN $(CLEAN_LIST)
@rm -f $(CLEAN_LIST)
it works...
and write another CMakeLists.txt:
cmake_minimum_required(VERSION 3.10.2)
project (mnist_simple C CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Armadillo REQUIRED)
find_package(Boost REQUIRED COMPONENTS serialization)
# demostrated by https://github.com/mlpack/mlpack/issues/444
find_path(MLPACK_INCLUDE_DIR
NAMES include
PATHS /home/pmixer/Downloads/gsoc/mlpack/build/
)
find_path(ENSMALLEN_INCLUDE_DIR
NAMES ensmallen.hpp
PATHS /home/pmixer/Downloads/gsoc/ensmallen/include/
)
find_library(MLPACK_LIBRARY
NAMES mlpack
PATHS /home/pmixer/Downloads/gsoc/mlpack/build/lib/
)
include_directories(${Boost_INCLUDE_DIRS})
message( ${Boost_INCLUDE_DIRS} )
include_directories(${MLPACK_INCLUDE_DIR})
message(${MLPACK_INCLUDE_DIR})
include_directories("/home/pmixer/Downloads/gsoc/mlpack/build/include/")
include_directories(${ENSMALLEN_INCLUDE_DIR})
message(${ENSMALLEN_INCLUDE_DIR})
add_executable(simple mnist_simple.cpp)
target_link_libraries(simple ${MLPACK_LIBRARY})
target_link_libraries(simple "armadillo")
target_link_libraries(simple Boost::serialization)
which also work πΉ, not sure what happended in linking phase if combine compiling .o file and linking together as in initial pasted compile command. Would go back to this thread latter to figure out what's wrong with it. (as compiled and executed mnist sample, would start reimplement JODIE etc. lol)
from examples.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! π
from examples.
Related Issues (20)
- Guidelines for adding new examples HOT 12
- Fix lstm_stock_prediction dataset location HOT 3
- `mnist_batch_norm` fails with incorrect matrix multiply size HOT 7
- Problem in shebang line in "download_data_set.py" HOT 2
- Bug in RNN HOT 1
- exception: std::logic_error HOT 18
- Changing CNN weights HOT 3
- DBSCAN example datasets? HOT 3
- Put examples in folder by language HOT 14
- MNIST dataset HOT 1
- Exception in mnist_cnn.cpp HOT 5
- it is solvedοΌ HOT 1
- Set up CI workflow on Jenkins HOT 1
- Target class out of range when compiling and running mnist examples HOT 4
- Mlpack tutorials on NLP related projects HOT 3
- MNIST simple example fails training against mlpack 3.4.2 on Windows/MSVC Visual Studio 17 latest HOT 3
- Error compiling : RNN class : expected a type, got MeanSquaredError HOT 2
- mnist_vae adaptation with mlpack 4 or above version HOT 1
- error in setting mlpack local environment for jupyter HOT 8
- Proposal for Adding New Examples to mlpack's Example Zoo HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from examples.