Skip to content

Instantly share code, notes, and snippets.

@Anachron
Created July 12, 2019 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Anachron/7f9d136ec0ab5c40ae35f40257089e3e to your computer and use it in GitHub Desktop.
Save Anachron/7f9d136ec0ab5c40ae35f40257089e3e to your computer and use it in GitHub Desktop.
Samba cross compile issue
# project samba configured on Fri Jul 12 10:02:56 2019 by
# waf 1.5.19 (abi 7, python 20710f0 on linux2)
# using buildtools/bin/waf configure --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc/samba --with-configdir=/etc/samba --localstatedir=/var --enable-fhs --with-lockdir=/var/cache/samba --with-piddir=/var/run/samba --with-logfilebase=/var/log/samba --with-pam --without-systemd --with-ads --with-shared-modules=idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2,pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4,auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4 --enable-cups --bundled-libraries=!asn1_compile,!compile_et --cross-compile --hostcc=cc --cross-answers=answers.txt
#
----------------------------------------
Checking for program gcc or cc
find program=['gcc', 'cc'] paths=[] var='CC'
-> 'aarch64-linux-gnu-gcc'
----------------------------------------
Checking for program ar
find program=['ar'] paths=[] var='AR'
-> 'aarch64-linux-gnu-ar'
----------------------------------------
Checking for program ranlib
find program=['ranlib'] paths=[] var='RANLIB'
-> 'aarch64-linux-gnu-ranlib'
----------------------------------------
Checking for gcc
ok
----------------------------------------
Checking for program git
find program=['git'] paths=[] var='GIT'
-> ''
----------------------------------------
Check for -MD
==>
int main() {return 0;}
<==
[1/1] Compiling test.c
['aarch64-linux-gnu-gcc', '-fstack-clash-protection', '-D_FORTIFY_SOURCE=2', '-O2', '-pipe', '-march=armv8-a', '-DUSE_SETUIDX=0', '-I/usr/aarch64-linux-gnu/usr/include', '-MD', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '../test.c', '-c', '-o', '/builddir/samba-4.9.4/bin/.conf_check_0/testbuild/default/test_1.o']
yes
----------------------------------------
Checking for program gdb
find program=['gdb'] paths=[] var=None
-> ''
----------------------------------------
Checking for header sys/utsname.h
==>
#include
int main(void) { return 0; }
<==
[1/1] Compiling test.c
['aarch64-linux-gnu-gcc', '-fstack-clash-protection', '-D_FORTIFY_SOURCE=2', '-O2', '-pipe', '-march=armv8-a', '-DUSE_SETUIDX=0', '-I/usr/aarch64-linux-gnu/usr/include', '-MD', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '../test.c', '-c', '-o', 'default/test_1.o']
yes
----------------------------------------
Checking uname sysname type
==>
#define CONFIG_H_IS_FROM_SAMBA 1
#define _SAMBA_BUILD_ 4
#define HAVE_CONFIG_H 1
#define SRCDIR "/builddir/samba-4.9.4"
#define HAVE_SYS_UTSNAME_H 1
#include
int main(void) {
int printf(const char *format, ...);
struct utsname n;
if (uname(&n) == -1) return -1;
printf("%s", n.sysname);
; return 0; }
<==
[1/2] Compiling test.c
['aarch64-linux-gnu-gcc', '-fstack-clash-protection', '-D_FORTIFY_SOURCE=2', '-O2', '-pipe', '-march=armv8-a', '-DUSE_SETUIDX=0', '-I/usr/aarch64-linux-gnu/usr/include', '-MD', '-Idefault', '-I..', '-Idefault', '-I..', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '../test.c', '-c', '-o', 'default/test_1.o']
[2/2] Linking default/testprog
['aarch64-linux-gnu-gcc', 'default/test_1.o', '-o', '/builddir/samba-4.9.4/bin/.conf_check_0/testbuild/default/testprog', '-Wl,-z,relro', '-Wl,-z,now', '-Wl,--as-needed', '-L/usr/aarch64-linux-gnu/usr/lib']
returncode 254
not found
----------------------------------------
Checking uname machine type
==>
#define CONFIG_H_IS_FROM_SAMBA 1
#define _SAMBA_BUILD_ 4
#define HAVE_CONFIG_H 1
#define SRCDIR "/builddir/samba-4.9.4"
#define HAVE_SYS_UTSNAME_H 1
/* #undef SYSTEM_UNAME_SYSNAME */
#include
int main(void) {
int printf(const char *format, ...);
struct utsname n;
if (uname(&n) == -1) return -1;
printf("%s", n.machine);
; return 0; }
<==
[1/2] Compiling test.c
['aarch64-linux-gnu-gcc', '-fstack-clash-protection', '-D_FORTIFY_SOURCE=2', '-O2', '-pipe', '-march=armv8-a', '-DUSE_SETUIDX=0', '-I/usr/aarch64-linux-gnu/usr/include', '-MD', '-Idefault', '-I..', '-Idefault', '-I..', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '../test.c', '-c', '-o', 'default/test_1.o']
[2/2] Linking default/testprog
['aarch64-linux-gnu-gcc', 'default/test_1.o', '-o', '/builddir/samba-4.9.4/bin/.conf_check_0/testbuild/default/testprog', '-Wl,-z,relro', '-Wl,-z,now', '-Wl,--as-needed', '-L/usr/aarch64-linux-gnu/usr/lib']
returncode 254
not found
----------------------------------------
Checking uname release type
==>
#define CONFIG_H_IS_FROM_SAMBA 1
#define _SAMBA_BUILD_ 4
#define HAVE_CONFIG_H 1
#define SRCDIR "/builddir/samba-4.9.4"
#define HAVE_SYS_UTSNAME_H 1
/* #undef SYSTEM_UNAME_SYSNAME */
/* #undef SYSTEM_UNAME_MACHINE */
#include
int main(void) {
int printf(const char *format, ...);
struct utsname n;
if (uname(&n) == -1) return -1;
printf("%s", n.release);
; return 0; }
<==
[1/2] Compiling test.c
['aarch64-linux-gnu-gcc', '-fstack-clash-protection', '-D_FORTIFY_SOURCE=2', '-O2', '-pipe', '-march=armv8-a', '-DUSE_SETUIDX=0', '-I/usr/aarch64-linux-gnu/usr/include', '-MD', '-Idefault', '-I..', '-Idefault', '-I..', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '../test.c', '-c', '-o', 'default/test_1.o']
[2/2] Linking default/testprog
['aarch64-linux-gnu-gcc', 'default/test_1.o', '-o', '/builddir/samba-4.9.4/bin/.conf_check_0/testbuild/default/testprog', '-Wl,-z,relro', '-Wl,-z,now', '-Wl,--as-needed', '-L/usr/aarch64-linux-gnu/usr/lib']
returncode 254
not found
----------------------------------------
Checking uname version type
==>
#define CONFIG_H_IS_FROM_SAMBA 1
#define _SAMBA_BUILD_ 4
#define HAVE_CONFIG_H 1
#define SRCDIR "/builddir/samba-4.9.4"
#define HAVE_SYS_UTSNAME_H 1
/* #undef SYSTEM_UNAME_SYSNAME */
/* #undef SYSTEM_UNAME_MACHINE */
/* #undef SYSTEM_UNAME_RELEASE */
#include
int main(void) {
int printf(const char *format, ...);
struct utsname n;
if (uname(&n) == -1) return -1;
printf("%s", n.version);
; return 0; }
<==
[1/2] Compiling test.c
['aarch64-linux-gnu-gcc', '-fstack-clash-protection', '-D_FORTIFY_SOURCE=2', '-O2', '-pipe', '-march=armv8-a', '-DUSE_SETUIDX=0', '-I/usr/aarch64-linux-gnu/usr/include', '-MD', '-Idefault', '-I..', '-Idefault', '-I..', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '../test.c', '-c', '-o', 'default/test_1.o']
[2/2] Linking default/testprog
['aarch64-linux-gnu-gcc', 'default/test_1.o', '-o', '/builddir/samba-4.9.4/bin/.conf_check_0/testbuild/default/testprog', '-Wl,-z,relro', '-Wl,-z,now', '-Wl,--as-needed', '-L/usr/aarch64-linux-gnu/usr/lib']
returncode 254
not found
----------------------------------------
Checking for header stdio.h
==>
#include
int main(void) { return 0; }
<==
[1/1] Compiling test.c
['aarch64-linux-gnu-gcc', '-fstack-clash-protection', '-D_FORTIFY_SOURCE=2', '-O2', '-pipe', '-march=armv8-a', '-DUSE_SETUIDX=0', '-I/usr/aarch64-linux-gnu/usr/include', '-MD', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '../test.c', '-c', '-o', 'default/test_1.o']
yes
----------------------------------------
Checking simple C program
==>
#define CONFIG_H_IS_FROM_SAMBA 1
#define _SAMBA_BUILD_ 4
#define HAVE_CONFIG_H 1
#define SRCDIR "/builddir/samba-4.9.4"
#define HAVE_SYS_UTSNAME_H 1
/* #undef SYSTEM_UNAME_SYSNAME */
/* #undef SYSTEM_UNAME_MACHINE */
/* #undef SYSTEM_UNAME_RELEASE */
/* #undef SYSTEM_UNAME_VERSION */
#define HAVE_STDIO_H 1
#include
int main(void) { printf("hello world"); return 0; }
<==
[1/2] Compiling test.c
['aarch64-linux-gnu-gcc', '-fstack-clash-protection', '-D_FORTIFY_SOURCE=2', '-O2', '-pipe', '-march=armv8-a', '-DUSE_SETUIDX=0', '-I/usr/aarch64-linux-gnu/usr/include', '-I/builddir/samba-4.9.4/lib/replace/../../buildtools/wafsamba', '-MD', '-Idefault', '-I..', '-Idefault', '-I..', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '../test.c', '-c', '-o', 'default/test_1.o']
[2/2] Linking default/testprog
['aarch64-linux-gnu-gcc', 'default/test_1.o', '-o', '/builddir/samba-4.9.4/bin/.conf_check_0/testbuild/default/testprog', '-Wl,-z,relro', '-Wl,-z,now', '-Wl,--as-needed', '-L/usr/aarch64-linux-gnu/usr/lib']
returncode 254
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment