Statistics
| Branch: | Revision:

## root / latex / note_w07.tex @ 4ca27bae

1 2 3 d1ed66aa Quynh PX Nguyen %!TEX root = note.tex  %%%%%%%%%%%%%%%%%%  % WEEK 7  %%%%%%%%%%%%%%%%%%  \section{Week 7}   \subsection{Figuring out boost/lambda}   \subsubsection{Test to make sure that boost/lambda header file is not included in the firmware image}   \begin{tabular}{l|l|l|l}   Order & Select boost in menuconfig & DEPENDS:= +boost & Result \\   1 & Yes & Yes & Yes \\   2 & Yes & No & Yes | No \\   3 & No & Yes & Yes \\   4 & No & No & No \\   \end{tabular}   \textbf{STAGING\_DIR}   Note that in the case No. 2, if we have \lstinline{/home/quynh/Thesis/cc-openwrt/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/include/boost/lambda/lambda.hpp}, then the header file from Boost library is still included in compilation process   The staging directory is where both target and host development files are stored. Libraries and headers that are required for package compilation are stored there (as well as the toolchain). The build system includes \$STAGING\_DIR during the build process, and links against libraries stored in there. \footnote{https://forum.openwrt.org/viewtopic.php?id=47448}   We can clean the \lstinline{staging\_dir} and \lstinline{build\_dir} with \lstinline{make dirclean}.   After \lstinline{dirclean}, then we cannot run \lstinline{make package/hello-boost-lambda/compile V=s}   \begin{lstlisting}  $ make package/hello-boost-lambda/compile V=s  make[1]: Entering directory /home/quynh/Thesis/cc-openwrt'  make[2]: Entering directory /home/quynh/Thesis/cc-openwrt/package/libs/toolchain'  mkdir -p /home/quynh/Thesis/cc-openwrt/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain  touch /home/quynh/Thesis/cc-openwrt/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/.prepared_d3923b47dd5ae45263460d1c2269b9ea  rm -f /home/quynh/Thesis/cc-openwrt/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/.toolchain_installed  ....  cp: cannot stat '/home/quynh/Thesis/cc-openwrt/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libuClibc-*.so': No such file or directory  cp: cannot stat '/home/quynh/Thesis/cc-openwrt/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libcrypt-*.so': No such file or directory  cp: cannot stat '/home/quynh/Thesis/cc-openwrt/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libm-*.so': No such file or directory  cp: cannot stat '/home/quynh/Thesis/cc-openwrt/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libpthread-*.so': No such file or directory  make[2]: *** [/home/quynh/Thesis/cc-openwrt/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/.built] Error 1  make[2]: Leaving directory /home/quynh/Thesis/cc-openwrt/package/libs/toolchain'  make[1]: *** [package/libs/toolchain/compile] Error 2  make[1]: Leaving directory /home/quynh/Thesis/cc-openwrt'  make: *** [package/hello-boost-lambda/compile] Error 2   \end{lstlisting}   \subsection{MAKE command}   \lstinline{package/compile} or \lstinline{package compile}. I guess it has to do with this one:   \lstinline{-C dir, --directory=dir}   Change to directory dir before reading the makefiles or doing anything else. If multiple -C options are specified, each is interpreted relative to the previous one: -C / -C etc is equivalent to -C /etc. This is typically used with recursive invocations of make.   So the correct version is \lstinline{make package/boost/compile}   \begin{lstlisting}  make package/boost/c lean V=s  $make -C package/custom/hello-boost-lambda compile  make: Entering directory /home/quynh/Thesis/cc-openwrt/package/custom/hello-boost-lambda'  Makefile:19: /rules.mk: No such file or directory  Makefile:31: /package.mk: No such file or directory  make: *** No rule to make target /package.mk'. Stop.  make: Leaving directory /home/quynh/Thesis/cc-openwrt/package/custom/hello-boost-lambda'  $ make package/custom/hello-boost-lambda/compile V=s  ...  hello-boost-lambda.cpp:3:35: fatal error: boost/lambda/lambda.hpp: No such file or directory   #include   ^  compilation terminated.  make[3]: *** [hello-boost-lambda.o] Error 1  make[3]: Leaving directory /home/quynh/Thesis/cc-openwrt/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/hello-boost-lambda'  make[2]: *** [/home/quynh/Thesis/cc-openwrt/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/hello-boost-lambda/.built] Error 2  make[2]: Leaving directory /home/quynh/Thesis/cc-openwrt/package/custom/hello-boost-lambda'  make[1]: *** [package/custom/hello-boost-lambda/compile] Error 2  make[1]: Leaving directory /home/quynh/Thesis/cc-openwrt'  make: *** [package/custom/hello-boost-lambda/compile] Error 2  \$ make package/custom/hello-boost-lambda compile V=s  make: package/custom/hello-boost-lambda' is up to date.  make[1]: Entering directory /home/quynh/Thesis/cc-openwrt'  make[1]: *** No rule to make target compile'. Stop.  make[1]: Leaving directory /home/quynh/Thesis/cc-openwrt'  make: *** [compile] Error 2   \end{lstlisting}   \subsection{Problem with Boost again ==> SOLVED}   \textbf{I ran into the problem with compiling Boost package again.}   After trying multiple times, compiling \lstinline{boost}, \lstinline{boost-graph}, I noticed that \texttt{boost-graph has to be:}   \begin{itemize}   \item selected in the \lstinline{menuconfig}   \item (or) declared in \lstinline{DEPENDS:=+boost-graph}   \end{itemize}   so that the errors that the ERROR \lstinline{no shared objects *.so* files can be found} can be prevented.   Also, for \lstinline{DEPENDS} needs to have either \lstinline{boost or boost-graph} in the \lstinline{hello-boost-lambda} package, so that there will not be an ERROR \lstinline{lambda.hpp is not found}   \textbf{Check out} paper note from Nov 5, 2015 for all the detailed experiments that I carried out to know exactly what is the root of the problem.   \subsection{Hello World for BGL}   Done   I wrote a program to output all the vertices and edges in the graph.   I coded with CLion, since it's easier to debug and see error in the IDE. Then I wrote a script to only move necessary files to make the package for OpenWrt Image.   \subsection{Data Description}   \subsection{Write a Graph Data Parser program}   \textbf{Description:} This program is more complex than the hello-boost-graph   \subsection{Remaning Tasks}   \begin{itemize}   \item Read the graph data description   \item How to install the package *.ipk to the running instance of firmware image. Right now, I'm still stuck with the error "no space available"   \end{itemize}