Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-12 Thread Graeme Geldenhuys
On 2016-09-11 23:54, fredvs wrote: > Did you add, in your /boot/loader.conf: > > linux64_load="YES" No, I don't have any linux[32|64]_load="YES" entries in my loader.conf > > PS: You need this kernel: /boot/kernel/linux64.ko Interestingly, kldstat output shows I have a linux.ko and linux64.ko

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-11 Thread fredvs
Gaaal. $ uname -a > FreeBSD 10.3-RELEASE #0 amd64 $ /usr/local/lib/fpc/3.0.0/ppcx64_linux test.pas ---> Free Pascal Compiler version 3.0.0 [2015/11/20] for x86_64 Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: Linux for x86-64 (3104) Compiling

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-11 Thread fredvs
Graeme Geldenhuys-6 wrote > That's weird. On my 64-bit FreeBSD, I can't run 64-bit Linux > applications, but can run 32-bit Linux applications. So I'm experiencing > a bit of the opposite to you then. :-/ Hello Graeme. Did you add, in your /boot/loader.conf: linux64_load="YES" PS: You need

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-09 Thread fredvs
> Unfortunately I don't have any other 32-bit FreeBSD VM where I can install FPC 3.0.0 on. Hum, for me the simplest and working way to install fpc 32 bit was from... official fpc download site: http://www.freepascal.org/down/i386/freebsd.var --> unzip the file + sh install.sh --> done and

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-09 Thread fredvs
>That's weird. On my 64-bit FreeBSD, I can't run 64-bit Linux > applications, but can run 32-bit Linux applications. So I'm experiencing > a bit of the opposite to you then. :-/ Huh, and on my 64-bit FreeBSD I can run fpc-linux 64 bit but not fpc-linux 32 bit ! Fre;D - Many thanks ;-)

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-09 Thread Marc Santhoff
On Fr, 2016-09-09 at 09:06 +0100, Graeme Geldenhuys wrote: > On 2016-09-05 05:02, fredvs wrote: > > In FreeBSD forum they explain that FreeBSD 64 bit can run Linux 64 bit > > applications (I am able too) but can only link Linux 32 bit applications > > (that cannot be run on a FreeBSD 64 bit

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-09 Thread Giuliano Colla
Il 09/09/2016 10:17, Graeme Geldenhuys ha scritto: Unfortunately I don't have any other 32-bit FreeBSD VM where I can install FPC 3.0.0 on. I know that you don't like automated scripts, but you should consider fpcup (or fpclazup), in order to experiment with different fpc/Lazarus versions.

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-09 Thread Graeme Geldenhuys
On 2016-09-06 00:42, fredvs wrote: > With fpc 3.0.0, on my system, the smart-link is wrong, it calls ld-elf.so.1 > in place of ld-elf*32*.so.1. My 32-bit FreeBSD VM only has FPC 2.6.2, but on it I managed to compile and use -XX -Xs -O2 compiler parameters without problems. [goofy]

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-09 Thread Graeme Geldenhuys
On 2016-09-05 05:02, fredvs wrote: > In FreeBSD forum they explain that FreeBSD 64 bit can run Linux 64 bit > applications (I am able too) but can only link Linux 32 bit applications > (that cannot be run on a FreeBSD 64 bit system). That's weird. On my 64-bit FreeBSD, I can't run 64-bit Linux

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-06 Thread Marc Santhoff
On Di, 2016-09-06 at 10:42 -0700, fredvs wrote: > > No, I didn't. I only compile native programs. > > Huh, it is what I wanted to ask... > > Did you try to compile on a native FreeBSD 32 bit using -XX parameter (smart > link). No, I have no FreeBSD 32 Bit at hand, sorry. Marc

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-06 Thread fredvs
> No, I didn't. I only compile native programs. Huh, it is what I wanted to ask... Did you try to compile on a native FreeBSD 32 bit using -XX parameter (smart link). Fre;D - Many thanks ;-) -- View this message in context:

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-05 Thread Marc Santhoff
On Mo, 2016-09-05 at 16:42 -0700, fredvs wrote: > Thanks Marc for that clear explanation, I knew linux emulation, of course, > but not that nickname. > > By the way, if you are using a FreeBSD 32 bit system, did you try to compile > a fpc application with smart link enabled (*-XX* parameter) ?

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-05 Thread fredvs
Thanks Marc for that clear explanation, I knew linux emulation, of course, but not that nickname. By the way, if you are using a FreeBSD 32 bit system, did you try to compile a fpc application with smart link enabled (*-XX* parameter) ? With fpc 3.0.0, on my system, the smart-link is wrong, it

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-05 Thread Marc Santhoff
On So, 2016-09-04 at 08:44 -0700, fredvs wrote: > There is a answer there (but not sure I understand, what is "linuxolator" ?) The Linuxolator is a freebsd specific term for the linux binary emulation on freebsd. AFAIK it is done by implementing a small layer between the linux libraries and

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-04 Thread fredvs
> And for a other problem with fpc, no aswer yet... > https://forums.freebsd.org/threads/57520/ > Yep, this one I get it. This fpc parameter (that I was using) is not compatible for cross compiling: -*XX* (Link smart). Without this, fpc can

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-03 Thread Marc Santhoff
On Fr, 2016-09-02 at 15:03 -0700, fredvs wrote: > Hello Marc. > > And thanks to help. You're welcome. [...] > But when compiling on a FreeBSD 64 bit system using fpc-*linux-64*, there is > that message on linking: > > [4.438] Searching file /bin/ld... found > [4.438] Using util /bin/ld >

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-02 Thread fredvs
> I'd suggest asking on one of the freebsd mailing lists or some forum. Hum, we are very near the goal, I prefer to resolve it with fpc-family ;-) Fre;D - Many thanks ;-) -- View this message in context:

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-02 Thread fredvs
Hello Marc. And thanks to help. OK, I have investigate more and there is something that disturb me: When compiling on a FreeBSD 64 bit system using fpc-freebsd-*64*, there is that message on linking: [3.069] Searching file /usr/bin/ld... found [3.069] Using util /usr/bin/ld [3.069] Executing

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-02 Thread Marc Santhoff
On Fr, 2016-09-02 at 09:32 -0700, fredvs wrote: > Hello Marc. Hi Fred. > Thanks for the infos, good to know that it is possible to install linux > package via FreeBSD-pkg install. > Sadly I did not see any linux-ld or linux-binutils package in > https://www.freebsd.org/ports/linux.html > > So,

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-02 Thread Marc Santhoff
On Fr, 2016-09-02 at 08:57 -0700, fredvs wrote: > Hello. > > The night was very long and hard... > > I have some result. > > Here how I did: > > - Copy ld-linux into /compat/linux/bin > > - Copy dependencies-linux needed by ld-linux (some needed to be in > /compat/linux/lib, other in

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-02 Thread fredvs
Hello Marc. Thanks for the infos, good to know that it is possible to install linux package via FreeBSD-pkg install. Sadly I did not see any linux-ld or linux-binutils package in https://www.freebsd.org/ports/linux.html So, the manually way that i did is the only way (yes/no ?). Many thanks for

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-02 Thread fredvs
Hello. The night was very long and hard... I have some result. Here how I did: - Copy ld-linux into /compat/linux/bin - Copy dependencies-linux needed by ld-linux (some needed to be in /compat/linux/lib, other in /compat/linux/lib64). - When using fpc-linux to compile-link a simple

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread Marc Santhoff
On Do, 2016-09-01 at 14:24 -0700, fredvs wrote: > > Sorry, I can't help you much with that, ld-linux is not installed here > > and I don't know which package it is from. > > Huh, is it possible to install Linux packages (apt-get install something) in > a FreeBSD system ? > Or do you mean (like I

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread fredvs
> Sorry, I can't help you much with that, ld-linux is not installed here > and I don't know which package it is from. Huh, is it possible to install Linux packages (apt-get install something) in a FreeBSD system ? Or do you mean (like I did), copy ld-linux from a installed Linux system. ?

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread fredvs
Hello Pierre. I will try first with Jonas tip. If I m not able to do it work, i will try with binutils. Many thanks to help. Fre;D - Many thanks ;-) -- View this message in context:

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread Marc Santhoff
On Do, 2016-09-01 at 13:54 -0700, fredvs wrote: > > See Greames message for why you still will have to use the Linux ld. > > Your error message clearly says, the FreeBSD linker can only create bfsd > > code for i386 and x64. > > >> Supported emulation: elf_x86_64_fbsd and elf_i386_fbsd > > Yes,

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread Pierre Free Pascal
> -Message d'origine- > De : fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal- > boun...@lists.freepascal.org] De la part de fredvs > Envoyé : jeudi 1 septembre 2016 22:55 > À : fpc-pascal@lists.freepascal.org > Objet : Re: [fpc-pascal] Linking to Linux on a FreeBSD system with

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread fredvs
> See Greames message for why you still will have to use the Linux ld. > Your error message clearly says, the FreeBSD linker can only create bfsd > code for i386 and x64. >> Supported emulation: elf_x86_64_fbsd and elf_i386_fbsd Yes, before to sent that topic, I have try with the Linux ld

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread fredvs
> But yes, I still prefer actual VMs of each OS. Me too if I had a powerful machine. But on a slow netbook, the fotal-emulator of FreeBSD is a perfect solution. Fre;D - Many thanks ;-) -- View this message in context:

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread Graeme Geldenhuys
On 2016-09-01 19:53, Graeme Geldenhuys wrote: > in theory there should be issues testing a linux program under FreeBSD. Oops, typo. That should read: "..there should be no issues testing..." Regards, Graeme ___ fpc-pascal maillist -

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread Graeme Geldenhuys
On 2016-09-01 20:28, Marc Santhoff wrote: > See Greames message for why you still will have to use the Linux ld. Yes, and when installed, it will most likely be installed in the /compat/linux/* hierarchy. Regards, Graeme ___ fpc-pascal maillist -

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread Marc Santhoff
On Do, 2016-09-01 at 09:56 -0700, fredvs wrote: > > With fpc's -k parameter, you can pass parameters directly to the linker. > > If you need to pass multiple parameters, use -k several times > > (e.g.-k-para1 -kvalue1) > > Wow, many thanks Jonas. > > I will try it and write you the result. > >

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread Graeme Geldenhuys
On 2016-09-01 19:02, Sven Barth wrote: > Keep in mind however that such emulators are never perfect and thus it > might be necessary nevertheless to test on a real system. Linux support under FreeBSD is actually a full install of CentOS 6. So in theory there should be issues testing a linux

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread Sven Barth
Am 01.09.2016 18:56 schrieb "fredvs" : > > > With fpc's -k parameter, you can pass parameters directly to the linker. > > If you need to pass multiple parameters, use -k several times > > (e.g.-k-para1 -kvalue1) > > Wow, many thanks Jonas. > > I will try it and write you the

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread fredvs
> With fpc's -k parameter, you can pass parameters directly to the linker. > If you need to pass multiple parameters, use -k several times > (e.g.-k-para1 -kvalue1) Wow, many thanks Jonas. I will try it and write you the result. But, imagine, with FreeBSD, you could: Compile and run on same

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread Jonas Maebe
On 01/09/16 18:32, fredvs wrote: Could it be possible to change the default emulation used by ld while linking ? With fpc's -k parameter, you can pass parameters directly to the linker. If you need to pass multiple parameters, use -k several times (e.g. -k-para1 -kvalue1) Jonas

[fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-01 Thread fredvs
Hello. In a FreeBSD 64 system with Linux emulated, fpc-linux compiles without problems but at linking there is that message: > ... Linking > /usr/bin/ld: unrecognizer emulation mode: elf_x86_64 > Supported emulation: elf_x86_64_fbsd and elf_i386_fbsd In ld documentation there is: -memulation