Statistics
| Branch: | Revision:

root / latex / note_w07.tex @ 4ca27bae

History | View | Annotate | Download (6.82 KB)

1
%!TEX root = note.tex
2

    
3
%%%%%%%%%%%%%%%%%%
4
% WEEK 7
5
%%%%%%%%%%%%%%%%%%
6
\section{Week 7}
7
    \subsection{Figuring out boost/lambda}
8
        \subsubsection{Test to make sure that boost/lambda header file is not included in the firmware image}
9

    
10
            \begin{tabular}{l|l|l|l}
11
                Order & Select boost in menuconfig & DEPENDS:= +boost & Result \\
12
                1 & Yes & Yes & Yes \\
13
                2 & Yes & No & Yes | No \\
14
                3 & No & Yes & Yes \\
15
                4 & No & No & No \\
16
            \end{tabular}
17

    
18
            \textbf{STAGING\_DIR}
19

    
20
            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
21

    
22
            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}
23

    
24
            We can clean the \lstinline{staging\_dir} and \lstinline{build\_dir} with \lstinline{make dirclean}.
25

    
26
            After \lstinline{dirclean}, then we cannot run \lstinline{make package/hello-boost-lambda/compile V=s}
27

    
28
            \begin{lstlisting}
29
$ make package/hello-boost-lambda/compile V=s
30
make[1]: Entering directory `/home/quynh/Thesis/cc-openwrt'
31
make[2]: Entering directory `/home/quynh/Thesis/cc-openwrt/package/libs/toolchain'
32
mkdir -p /home/quynh/Thesis/cc-openwrt/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain
33
touch /home/quynh/Thesis/cc-openwrt/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/.prepared_d3923b47dd5ae45263460d1c2269b9ea
34
rm -f /home/quynh/Thesis/cc-openwrt/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/.toolchain_installed
35
....
36
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
37
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
38
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
39
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
40
make[2]: *** [/home/quynh/Thesis/cc-openwrt/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/.built] Error 1
41
make[2]: Leaving directory `/home/quynh/Thesis/cc-openwrt/package/libs/toolchain'
42
make[1]: *** [package/libs/toolchain/compile] Error 2
43
make[1]: Leaving directory `/home/quynh/Thesis/cc-openwrt'
44
make: *** [package/hello-boost-lambda/compile] Error 2
45
            \end{lstlisting}
46

    
47

    
48
    \subsection{MAKE command}
49
        \lstinline{package/compile} or \lstinline{package compile}. I guess it has to do with this one:
50

    
51
        \lstinline{-C dir, --directory=dir}
52

    
53
        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.
54

    
55
        So the correct version is \lstinline{make package/boost/compile}
56

    
57
        \begin{lstlisting}
58
make package/boost/c lean V=s
59

    
60
$ make -C package/custom/hello-boost-lambda compile
61
make: Entering directory `/home/quynh/Thesis/cc-openwrt/package/custom/hello-boost-lambda'
62
Makefile:19: /rules.mk: No such file or directory
63
Makefile:31: /package.mk: No such file or directory
64
make: *** No rule to make target `/package.mk'.  Stop.
65
make: Leaving directory `/home/quynh/Thesis/cc-openwrt/package/custom/hello-boost-lambda'
66

    
67

    
68
$ make package/custom/hello-boost-lambda/compile V=s
69
...
70
hello-boost-lambda.cpp:3:35: fatal error: boost/lambda/lambda.hpp: No such file or directory
71
 #include <boost/lambda/lambda.hpp>
72
                                   ^
73
compilation terminated.
74
make[3]: *** [hello-boost-lambda.o] Error 1
75
make[3]: Leaving directory `/home/quynh/Thesis/cc-openwrt/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/hello-boost-lambda'
76
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
77
make[2]: Leaving directory `/home/quynh/Thesis/cc-openwrt/package/custom/hello-boost-lambda'
78
make[1]: *** [package/custom/hello-boost-lambda/compile] Error 2
79
make[1]: Leaving directory `/home/quynh/Thesis/cc-openwrt'
80
make: *** [package/custom/hello-boost-lambda/compile] Error 2
81

    
82

    
83
$ make package/custom/hello-boost-lambda compile V=s
84
make: `package/custom/hello-boost-lambda' is up to date.
85
make[1]: Entering directory `/home/quynh/Thesis/cc-openwrt'
86
make[1]: *** No rule to make target `compile'.  Stop.
87
make[1]: Leaving directory `/home/quynh/Thesis/cc-openwrt'
88
make: *** [compile] Error 2
89
        \end{lstlisting}
90

    
91
    \subsection{Problem with Boost again ==> SOLVED}
92

    
93
        \textbf{I ran into the problem with compiling Boost package again.}
94

    
95
            After trying multiple times, compiling \lstinline{boost}, \lstinline{boost-graph}, I noticed that \texttt{boost-graph has to be:}
96

    
97
            \begin{itemize}
98
                \item selected in the \lstinline{menuconfig}
99
                \item (or) declared in \lstinline{DEPENDS:=+boost-graph}
100
            \end{itemize}
101

    
102
            so that the errors that the ERROR \lstinline{no shared objects *.so* files can be found} can be prevented.
103

    
104
            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}
105

    
106
            \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.
107

    
108
    \subsection{Hello World for BGL}
109
        Done
110

    
111
        I wrote a program to output all the vertices and edges in the graph.
112

    
113
        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.
114

    
115
    \subsection{Data Description}
116

    
117
    \subsection{Write a Graph Data Parser program}
118
        \textbf{Description:} This program is more complex than the hello-boost-graph
119

    
120
    \subsection{Remaning Tasks}
121
        \begin{itemize}
122
            \item Read the graph data description
123
            \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"
124
        \end{itemize}