Error: Assembler mips-linux-as not found, switching to external assembling lazarus / 61-Beginners ---------------------------------------------------------------------- czd · 2016-06-11 14:44 Hi all, I have just compiled the new fpc3.1.1 from svn for mips-linux platform, when I compile a simple test program I get the following error. Here is the test program and the output. program test; begin   writeln('DATE ',{$i %DATE%});   writeln('FPCTARGET ',{$i %FPCTARGET%});   writeln('FPCTARGETCPU ',{$i %FPCTARGETCPU%});   writeln('FPCTARGETOS ',{$i %FPCTARGETOS%});   writeln('FPCVERSION ',{$i %FPCVERSION%}); end. fpc -Tlinux -Pmips test.pas Free Pascal Compiler version 3.1.1 [2016/06/11] for mips Copyright (c) 1993-2016 by Florian Klaempfl and others Target OS: Linux for MIPSEB Compiling test.pas Assembling test test.pas(7,42) Error: Assembler mips-linux-as not found, switching to external assembling test.pas(7,42) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted Error: /usr/lib/fpc/3.1.1/ppcrossmips returned an error exitcode My crosscompiled binutils directory is /usr/mips-linux/bin and I changed the fpc.cfg just like that. #IFDEF CPUMIPS -XP/usr/mips-linux/bin/ -Xr/usr/lib/fpc/3.1.1/units/mips-linux/rtl/ -dmips -Tlinux #ENDIF Could someone point me out the right direction? What could be wrong? Thanks. ---------------------------------------------------------------------- Leledumbo · 2016-06-11 21:40 Quote from: czd on June 11, 2016, 04:44:16 pm#IFDEF CPUMIPS -XP/usr/mips-linux/bin/ -Xr/usr/lib/fpc/3.1.1/units/mips-linux/rtl/ -dmips -Tlinux #ENDIF from fpc -h: Quote-XP     Prepend the binutils names with the prefix That means the assembler and linker will be searched as /usr/mips- linux/bin/as and /usr/mips-linux/bin/ld, respectively, which is wrong. What you need is: Quote-e  Set path to executable -FD     Set the directory where to search for compiler utilities From the official docs: Quote-exxx     Specify xxx as the directory containing the executables for the programs as (the assembler) and ld (the linker). -FD     Same as -e. while maintaining -XP$FPCTARGET- so that assembler and linker will be searched as mips-linux-as and mips-linux-ld, respectively, which is right. ---------------------------------------------------------------------- czd · 2016-06-12 08:11 thanks leledumbo , it works perfectly, by the way test example works in onion-omega device.