Cross-compile systemd (to be continued)

Source: Internet
Author: User

In fact, you need to compile a good many use of the library, such as attr, caps, and so on, and then can begin to systemd. These details are later filled up.

When you start knitting systemd, first specify Cflags, Ldflags:

Export ldflags= "-l/home/charles/code/build_systemd/_install/lib-lattr"

Export cflags= "-i/home/charles/code/build_systemd/_install/include"

Then, execute configure:

./configure--host=arm-linux-gnueabi--prefix=/home/charles/code/build_systemd/_install

Finally, there is a mistake:

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

Also need to edit dbus.


After finishing the Dbus, basically there is no problem.

The last used configure configuration is:

./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 "

Then, you need to modify the makefile file, otherwise, some files will be installed in the system directory.

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
In fact, some of the above paths can also be specified in the above configure.

--with-sysvinit-path

--with-sysvrcnd-path

--with-bashcompletiondir


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.