交叉编译 systemd(to be continued)
2017-05-09 06:21
561 查看
其实需要先编译好好多用的库,比如 attr, caps等,然后才能开始编 systemd.这些细节以后补上。
开始编 systemd的时候,先指定 CFLAGS, LDFLAGS:
export LDFLAGS="-L/home/charles/code/build_systemd/_install/lib -lattr"
export CFLAGS="-I/home/charles/code/build_systemd/_install/include"
然后,执行 configure:
./configure --host=arm-linux-gnueabi --prefix=/home/charles/code/build_systemd/_install
最后还是有错:
CCLD test-bus-marshal
/toolchain/armv7-gcc-6.3/bin/../lib/gcc/arm-linux-gnueabi/6.3.0/../../../../arm-linux-gnueabi/bin/ld: cannot find -ldbus-1
collect2: error: ld returned 1 exit status
Makefile:13722: recipe for target 'test-bus-marshal' failed
make[2]: *** [test-bus-marshal] Error 1
Makefile:22641: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
Makefile:10161: recipe for target 'all' failed
make: *** [all] Error 2
还需要编 dbus..
编完dbus后基本上就没问题了。
最后使用的configure配置为:
./configure --host=arm-linux-gnueabi --prefix=/home/charles/code/build_systemd/_install/usr --exec-prefix=/home/charles/code/build_systemd/_install/usr --disable-xkbcommon CFLAGS="-I/home/charles/code/build_systemd/_install/include" LDFLAGS="-L/home/charles/code/build_systemd/_install/lib -lattr"
然后,还需要修改makefile文件,不然,安装的时候,有些文件会被安装到系统目录下。。
rootprefix = /home/charles/code/build_systemd/_install/usr
--with-sysvinit-path
--with-sysvrcnd-path
--with-bashcompletiondir
开始编 systemd的时候,先指定 CFLAGS, LDFLAGS:
export LDFLAGS="-L/home/charles/code/build_systemd/_install/lib -lattr"
export CFLAGS="-I/home/charles/code/build_systemd/_install/include"
然后,执行 configure:
./configure --host=arm-linux-gnueabi --prefix=/home/charles/code/build_systemd/_install
最后还是有错:
CCLD test-bus-marshal
/toolchain/armv7-gcc-6.3/bin/../lib/gcc/arm-linux-gnueabi/6.3.0/../../../../arm-linux-gnueabi/bin/ld: cannot find -ldbus-1
collect2: error: ld returned 1 exit status
Makefile:13722: recipe for target 'test-bus-marshal' failed
make[2]: *** [test-bus-marshal] Error 1
Makefile:22641: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
Makefile:10161: recipe for target 'all' failed
make: *** [all] Error 2
还需要编 dbus..
编完dbus后基本上就没问题了。
最后使用的configure配置为:
./configure --host=arm-linux-gnueabi --prefix=/home/charles/code/build_systemd/_install/usr --exec-prefix=/home/charles/code/build_systemd/_install/usr --disable-xkbcommon CFLAGS="-I/home/charles/code/build_systemd/_install/include" LDFLAGS="-L/home/charles/code/build_systemd/_install/lib -lattr"
然后,还需要修改makefile文件,不然,安装的时候,有些文件会被安装到系统目录下。。
rootprefix = /home/charles/code/build_systemd/_install/usr
bashcompletiondir = /home/charles/code/build_systemd/_install/usr/share/bash-completion/completions
SYSTEM_SYSVINIT_PATH = /home/charles/code/build_systemd/_install/etc/init.d SYSTEM_SYSVRCND_PATH = /home/charles/code/build_systemd/_install/etc/rc.d其实上面有些路径也可以在上面的configure里面指定的。。
--with-sysvinit-path
--with-sysvrcnd-path
--with-bashcompletiondir
相关文章推荐
- Survey over pattern string match algorithm[6 items updated && to be continued]
- Live Migration (SLES10 SP2 XEN) (3-问题篇)TO BE CONTINUED
- Very Useful Idioms I Truly Believed (To be continued...)
- My physically based simulation book list(To be continued)
- dns & bind (to be continued)
- 2004 To be continued!
- VS2010编译错误:fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x
- 推荐几个好用的asp.net控件(to be continued)
- Linux 101 Hacks __To be continued
- sqlite3 交叉编译 undefined reference to `fdatasync' 错误解决
- To be Continued
- 梳状滤波器(to be continued)
- 看美剧学英语,lie te me s01e01 重点单词 to be continued
- 算法基元(to be continued)
- VS2010编译错误:fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher
- 常用正则(to be continued)
- Serializing - 序列化 综述 – To be continued.
- CC Project -- A Javalette compiler -- to be continued
- VS2010编译错误:fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403...的解决方法
- 《鸟哥的linux》---To be continued