I'm trying to cross compile SmartMonTools for my TI DM 816x board. I've done a few other cross compiles, but not nearly enough to know what I need to do every time. The problem that I am running into is that my Ubuntu system, that I'm using, seems to build it just fine. I'm running the 5.38 version of smart tools, because I was running into errors trying to compile newer versions. When I finally complete the cross compile, I get the idiot error that says: ./sbin/smartctl: line 1: syntax error: word unexpected (expecting ")") So I know it didn't work. But when I run smartctl on my build machine, it says: smartctl version 5.38 [arm-none-linux-gnueabi] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ Which is all well and good, because I know it didn't cross compile. But the fact that it says that it was built for the arm-none-linux-gnueabi but doesn't work on there, it instead runs on my ubuntu system makes me concerned. The following are the commands I used to build it: sudo ./configure --host=arm-none-linux-gnueabi --build=arm-none-linux-gnueabi --target=arm CC=arm-none-linux-gnueabi-gcc sudo make sudo make install If I build on 5.43 of the software using the same commands as above, I get the following configure results: smartmontools-5.43 configuration: host operating system: arm-none-linux-gnueabi C++ compiler: g++ C compiler: arm-none-linux-gnueabi-gcc preprocessor flags: C++ compiler flags: -g -O2 -Wall -W C compiler flags: linker flags: OS specific modules: os_linux.o cciss.o binary install path: /usr/local/sbin man page install path: /usr/local/share/man doc file install path: /usr/local/share/doc/smartmontools examples install path: /usr/local/share/doc/smartmontools/examplescripts drive database file: /usr/local/share/smartmontools/drivedb.h database update script: /usr/local/sbin/update-smart-drivedb download tools: curl wget lynx local drive database: /usr/local/etc/smart_drivedb.h smartd config file: /usr/local/etc/smartd.conf smartd initd script: /usr/local/etc/init.d/smartd smartd save files: [disabled] smartd attribute logs: [disabled] libcap-ng support: no SELinux support: no After I make and make install, I get the following on the running of smartctl: smartctl 5.43 2012-06-30 r3573 [i686-linux-2.6.32-41-generic-pae] (local build) Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net So, the build obviously didn't work, but does anyone have any idea why? Thanks
CrossCompile SmartMonTools
@kimi http://hup.hu/treyblog/20140421/smartmontools_keresztforditas_arm-ra_ubu... 1) Install arm-2013.11-33-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 (or newer) from https://sourcery.mentor.com/GNUToolchain/ (e.g. /opt/arm-2013.11) 2) export PATH=$PATH:/opt/arm-2013.11/bin/ 3) ./configure --host=arm-none-linux-gnueabi LDFLAGS=-static 4) make /usr/bin # ./smartctl -d marvell -a /dev/sda smartctl 6.2 2013-07-26 r3841 [armv5tejl-linux-2.6.22.18] (local build) Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org HTH