samba4X 编译失败
230/2017] Linking default/source4/heimdal_build/asn1_compile [ 231/2017] Linking default/source4/heimdal_build/compile_et [ 232/2017] Compiling ASN1 source4/heimdal/lib/asn1/kx509.asn1 [ 233/2017] Compiling ASN1 source4/heimdal/lib/asn1/digest.asn1 /home/mltao/lean/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/samba-4.4.2/bin/asn1_compile: 1: /home/mltao/lean/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/samba-4.4.2/bin/asn1_compile: Syntax error: word unexpected (expecting ")") /home/mltao/lean/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/samba-4.4.2/bin/asn1_compile: 1: /home/mltao/lean/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/samba-4.4.2/bin/asn1_compile: Syntax error: word unexpected (expecting ")") Waf: Leaving directory `/home/mltao/lean/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/samba-4.4.2/bin' Build failed: -> task failed (err #2): {task: HEIMDAL_DIGEST_ASN1_ASN1 digest.asn1 -> asn1_digest_asn1.x,digest_asn1.hx,digest_asn1-priv.hx} -> task failed (err #2): {task: HEIMDAL_KX509_ASN1_ASN1 kx509.asn1 -> asn1_kx509_asn1.x,kx509_asn1.hx,kx509_asn1-priv.hx} Makefile:283: recipe for target '/home/mltao/lean/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/samba-4.4.2/.built' failed make[3]: *** [/home/mltao/lean/lede/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/samba-4.4.2/.built] Error 1 make[3]: Leaving directory '/home/mltao/lean/lede/package/lean/samba4x' package/Makefile:107: recipe for target 'package/lean/samba4x/compile' failed make[2]: *** [package/lean/samba4x/compile] Error 2 make[2]: Leaving directory '/home/mltao/lean/lede' package/Makefile:103: recipe for target '/home/mltao/lean/lede/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/stamp/.package_compile' failed make[1]: *** [/home/mltao/lean/lede/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/stamp/.package_compile] Error 2 make[1]: Leaving directory '/home/mltao/lean/lede' /home/mltao/lean/lede/include/toplevel.mk:216: recipe for target 'world' failed make: *** [world] Error 2 mltao@Tomerilery:~/lean/lede$
For those who have the same issue, T
To cross compile samba, you need to first compile with the host's compiler to generate asn1_compile and compile_et, which will be located at bin/default/source4/heimdal_build/compile_et and bin/default/source4/heimdal_build/asn1_compile. These two programs are used to convert ASN1 to C language. Then, copy these two files to some location, like DIR. Next source your toolchain from cross compile and also export the following variables
export USING_SYSTEM_ASN1_COMPILE=1
export ASN1_COMPILE="$DIR/asn1_compile"
export USING_SYSTEM_COMPILE_ET=1
export COMPILE_ET="$DIR/compile_et"
Finally, you can cross compile as usual.
Hope it help