Cross Compiler woes on Arch based system lazarus / 1-Linux ---------------------------------------------------------------------- snorkel · 2014-11-06 16:55 I just recently installed Lazarus on Netrunner (arch based) and it works great. So I went to build the win32 cross compiler and followed the directions in the wiki and nothing worked properly. On this particular distro the FPC source is in /usr/lib/fpc instead of /usr/local/lib/fpc  and when I built the cross compiler it stuck everything in /user/local in new directories and of course the make install didn't work either and I had to maually create the symlinks to /bin Is there something I missed when I built the cross compiler?  Should I have edited the make file? I hate to say this but the cross compiler stuff in the wiki is a mess and should be updated by someone who knows a bit more about than me. I have tried to update it in the past but it needs a complete overhaul. Thanks, Snorkel. ---------------------------------------------------------------------- BigChimp · 2014-11-06 17:09 Quote from: snorkel on November 06, 2014, 05:55:32 pmI hate to say this but the cross compiler stuff in the wiki is a mess and should be updated by someone who knows a bit more about than me. The Lazarus installation and Executing External Programs pages suck, too. ---------------------------------------------------------------------- snorkel · 2014-11-06 17:09 ok, I tried seting the FPCDIR env var and it still putting stuff in /usr/local/lib i.e. /usr/local/lib/fpc/2.6.4/units/i386-win32 it should be going in : /usr/lib/fpc/2.6.4/units/i386-win32 ---------------------------------------------------------------------- BigChimp · 2014-11-06 17:11 Are you running as root? Otherwise you probably don't have permissions for that directory. Would also be nice to show actual commands etc (basic steps when asking for help see first link in my signature). ---------------------------------------------------------------------- Leledumbo · 2014-11-06 17:49 Quote from: snorkel on November 06, 2014, 06:09:59 pmok, I tried seting the FPCDIR env var and it still putting stuff in /usr/local/lib i.e. /usr/local/lib/fpc/2.6.4/units/i386-win32 it should be going in : /usr/lib/fpc/2.6.4/units/i386-win32 Certainly, FPCDIR is not used for installation. Use INSTALL_PREFIX instead. In my opinion, make it the same as the host compiler (/usr) is a better choice. If you give up doing it manually, AUR has packages for you: https://aur.archlinux.org/packages/?O=0&K=fpc ---------------------------------------------------------------------- snorkel · 2014-11-06 17:55 Quote from: BigChimp on November 06, 2014, 06:11:46 pmAre you running as root? Otherwise you probably don't have permissions for that directory. Would also be nice to show actual commands etc (basic steps when asking for help see first link in my signature). I did everything with sudo -i, so I was root. As far as command go I just used this: http://wiki.lazarus.freepascal.org/Cross_compiling_for_Win32_under_Lin ux I got it working by adding this to the fpc.cfg with the path to the 2nd fpc directory the make command made for the cross compiler: -Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget/* when I did the make for the cross compiler it was showing /usr/lib for the paths that where whipping by in the console.  So I don't really know why it stuck all the win32 units and cross compiler in /user/local/lib ---------------------------------------------------------------------- snorkel · 2014-11-06 18:08 hmm, odd, I built the win64 cross compiler and it put the link to the cross compiler in /bin correctly.  Did not manually have to do it as for the win32 one. Bug in FPC? ---------------------------------------------------------------------- snorkel · 2014-11-06 18:17 ok I was wrong. It did not create a link at all for the 64bit win32 cross compiler. I did this to see where it actually put it: root@AO38181V src]# find / -name ppcross* /usr/lib/fpc/src/compiler/ppcross386 /usr/lib/fpc/src/compiler/ppcrossx64 /usr/local/lib/fpc/2.6.4/ppcross386 /usr/local/lib/fpc/2.6.4/ppcrossx64 /usr/bin/ppcross386 ppcrossx64 is not in any location that is in a system path,  yet the compiler can find it.  If I remove the symbolic link I created in /usr/bin for ppcross386 the compiler cannot find it. Why can it find the 64bit and not the 32 bit? ---------------------------------------------------------------------- snorkel · 2014-11-07 17:06 [/quote] Certainly, FPCDIR is not used for installation. Use INSTALL_PREFIX instead. In my opinion, make it the same as the host compiler (/usr) is a better choice. If you give up doing it manually, AUR has packages for you: https://aur.archlinux.org/packages/?O=0&K=fpc [/quote] It's all over in the make file, so I thought when I did make install it would use it, but apparently not.