Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
17 Views

x86_64-k1om-linux-ld: cannot find -lboost_system

I want to compile a procedure on Phi and CPU with MPI.

The following is CPU makefile.I compile it and get success.

  1 CC=mpiicpc
  2
  3 SSE=-xhost
  4
  5 CFLAGS = -O3 -I. $(SSE) -pthread -mcmodel=medium -std=c++0x -D BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS -I/work/02687/binren/threadpool     -I/work/02687/binren/boost_1_56_0_cpu
  6
  7 LIBS = -L/work/02687/binren/boost_1_56_0_cpu/stage/lib -lboost_system -lpthread
  8
  9 LDFLAGS = $(SSE) $(LIBS)
 10
 11 SRCS = $(wildcard ./*.cpp) $(wildcard ./framework/*.cpp)
 12
 13 $(info $(SRCS))
 14
 15 OBJS = $(SRCS:.cpp=.o)
 16
 17 main.cpu: $(OBJS) $(wildcard ./*.h)
 18         $(CC) $(LIBS) $(LDFLAGS) -o main.cpu $(OBJS)
 19 %.o : %.cpp
 20         $(CC) $(CFLAGS) -c $< -o $*.o
 21
 22 clean:
 23         -rm main.cpu $(OBJS)
                         

The  following is Phi makefile,I compile it and get error information.

"x86_64-k1om-linux-ld: cannot find -lboost_system"

  1 CC=mpiicpc
  2
  3 SSE=-mmic
  4
  5 CFLAGS = -O3 -I. $(SSE) -pthread -mcmodel=medium -std=c++0x -D MIC -D BOOST_NO_CXX11_ALLOCATOR -D BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTI    ONS -I/work/02687/binren/threadpool -I/work/02687/binren/boost_1_56_0
  6
  7 LIBS = -L/work/02687/binren/boost_1_56_0/stage/lib -lboost_system -lpthread
  8 #LIBS = -L/work/02687/binren/boost_1_56_0/stage/lib -lpthread
  9
 10 LDFLAGS = $(SSE) $(LIBS)
 11
 12 SRCS = $(wildcard ./*.cpp) $(wildcard ./framework/*.cpp)
 13
 14 $(info $(SRCS))
 15
 16 OBJS = $(SRCS:.cpp=.o)
 17
 18 main.mic: $(OBJS) $(wildcard ./*.h)
 19         $(CC) $(LIBS) $(LDFLAGS) -o main.mic $(OBJS)
 20 %.o : %.cpp
 21         $(CC) $(CFLAGS) -c $< -o $*.o
 22
 23 clean:
 24         -rm main.mic $(OBJS)

 

 

0 Kudos
2 Replies
Highlighted
Beginner
17 Views

echo $LD_LIBRARY_PATH
/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64:/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/mpi/intel64/lib:/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/mpi/mic/lib:/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/ipp/lib/intel64:/opt/intel/mic/coi/host-linux-release/lib:/opt/intel/mic/myo/lib:/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64:/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64:/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/tbb/lib/intel64/gcc4.4:/home/wj/phi/studio_2016/debugger_2016/libipt/intel64/lib:/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/daal/lib/intel64_lin:/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/daal/../tbb/lib/intel64_lin/gcc4.4:/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/daal/../compiler/lib/intel64_lin

echo $MIC_LD_LIBRARY_PATH
/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/compiler/lib/mic:/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/mpi/mic/lib:/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/ipp/lib/mic:/opt/intel/mic/coi/device-linux-release/lib:/opt/intel/mic/myo/lib:/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/compiler/lib/mic:/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/mkl/lib/mic:/home/wj/phi/studio_2016/compilers_and_libraries_2016.1.150/linux/tbb/lib/mic

0 Kudos
Highlighted
Black Belt
17 Views

The original advice on building boost for MIC may still have some relevance:

https://software.intel.com/en-us/articles/building-the-boost-library-to-run-natively-on-intelr-xeon-...

0 Kudos