[fpc-pascal] Linking with putty C code, various linker errors

2019-10-08 Thread tobiasgiesen
Hello, I am trying to make an SFTP client class based on putty. It will be open source and I think quite useful for many people, but it looks like I need some help :=) I need to link in over 100 .o files compiled with gcc. I am using the fpc 3.1.1 snapshot on Win64 for now. ISSUE #1: Undefined

Re: [fpc-pascal] ppc64le ABI problem

2019-08-27 Thread tobiasgiesen
Hello, here's a minimal Pascal program to call XGetWindowProperty: https://www.syncovery.com/minimalxtest.pas Cheers, Tobias On Mon, 26 Aug 2019 23:22:01 +0200 Pierre Muller wrote: > > > Le 26/08/2019 à 22:46, tobiasgie...@gmail.com a écrit : > > Hi Jonas, > > > > fantastic, that look

Re: [fpc-pascal] ppc64le ABI problem

2019-08-27 Thread tobiasgiesen
Hello, yes I will send you a minimal program to call XGetWindowProperty. Cheers, Tobias On Tue, 27 Aug 2019 11:35:01 +0200 Pierre Muller wrote: > Hi, > > the testsuite results show no difference, > this probably means that we have no test that checks > GCC compatibility for more than

Re: [fpc-pascal] ppc64le ABI problem

2019-08-26 Thread tobiasgiesen
Hi Pierre, wow that was fast and it works now! Lazarus (trunk) now compiles and runs without any changes on a POWER9 machine in little endian mode :=) Very beautiful! I couldn't be happier. Good work everyone! I'm running it on Ubuntu but I have also installed a few other Linux distributions, al

Re: [fpc-pascal] ppc64le ABI problem

2019-08-26 Thread tobiasgiesen
Hi Jonas, fantastic, that looks great. I think now I can just wait until Pierre Muller's snapshot is updated :=) Cheers, Tobias On Mon, 26 Aug 2019 21:42:37 +0200 Jonas Maebe wrote: > On 26/08/2019 20:56, Jonas Maebe wrote: > > On 26/08/2019 20:54, Florian Klaempfl wrote: > >> Am 26.08.2

Re: [fpc-pascal] ppc64le ABI problem

2019-08-26 Thread tobiasgiesen
Hello, trying to recompile now ... since ppc64le support is not in 3.0.4, I suppose I need to use a more recent version to compile it. So there is no advantage in cross-compiling and I might as well try it with the latest native fpc compiler? So I need to fix compiler errors myself, is that corre

Re: [fpc-pascal] ppc64le ABI problem

2019-08-26 Thread tobiasgiesen
Hello, many thanks, I will try it! I haven't compiled FPC for ppc64le myself so it can take a few days but I will let you know about the result. Cheers, Tobias On Mon, 26 Aug 2019 14:22:01 +0200 Florian Klämpfl wrote: > Am 26. August 2019 14:08:39 schrieb Sven Barth via fpc-pascal > : >

[fpc-pascal] ppc64le ABI problem

2019-08-25 Thread tobiasgiesen
Hello, while examining a crash when running Lazarus on ppc64le, I found the following issue in function calls. Calls to functions with more than eight parameters seem to be implemented differently from how gcc does it in a C program. gcc uses the memory location 96(r1) for the ninth parameter, b

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread tobiasgiesen
Hello, Delphi 10.3 is going to support inline variable declarations like this: begin var i : Integer := 22; WriteLn(i); end; I would assume it can also be used with records. For details, please see http://blog.marcocantu.com/blog/2018-october-inline-variables-delphi.html So maybe that's th

Re: [fpc-pascal] System call ABI problem on ppc Linux

2017-12-05 Thread tobiasgiesen
Hi, I will check it but the app really runs fine now after changing only FpFtruncate, and also FppRead and FppWrite (which nobody seems to use anyway). These are the occurrences of {$ifdef FPC_ABI_EABI}. I think the only problem is with fpmake, which doesn't include FPC_ABI_EABI for powerpc 32-

Re: [fpc-pascal] Minimum Linux version for FPC 3.0.2 (armhf)

2017-11-20 Thread tobiasgiesen
Hi Florian, many thanks for your reply! On DS-212j, it works perfectly including complex threading, OpenSSL, sqlite, sockets etc. so I didn't have any reason to think about armhf or not. Here's the CPU Info: Synology cpuinfo: Processor : Feroceon 88FR131 rev 1 (v5l) BogoMIPS: 11

Re: [fpc-pascal] FPC (trunk) on Linux/ppc64le

2017-10-20 Thread tobiasgiesen
Hello Pierre, again many thanks! The compiler works perfectly. I was able to compile my program with almost no changes and send it to the customer for testing. FPC is incredible, I will head to the donations page next :=) Cheers, Tobias Giesen Super Flexible Software Ltd. & Co. KG On Thu

[fpc-pascal] FPC (trunk) on Linux/ppc64le

2017-10-18 Thread tobiasgiesen
Hello, I wonder if anybody has a compiled binary that she or he could share? I need to run FPC natively on an IBM ppc64 LE Linux platform. Cheers, Tobias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/

Re: [fpc-pascal] SPARC / Linux

2017-03-11 Thread tobiasgiesen
Hello, great, I will get my server next week and try it! Cheers, Tobias On Sat, 11 Mar 2017 22:54:20 +0100 "Pierre Free Pascal" wrote: > If you are adventurous, > you might want to try the experimental files in: > ftp://ftp.freepascal.org/pub/fpc/contrib/test-cross-3.0.2/ > > it does cont

Re: [fpc-pascal] SPARC / Linux

2017-03-11 Thread tobiasgiesen
Hello, many thanks for the info! So if I explore the UltraSPARC platform, I guess I will stick with the available older binary release of FPC. I think it will be able to compile my software with minimal changes. I wonder if I compile something on an UltraSPARC server, if the compiled program wou

[fpc-pascal] SPARC / Linux

2017-03-11 Thread tobiasgiesen
Hello, I noticed there is no binary FPC 3.0.2 Linux release for SPARC. Should it be possible to compile it for SPARC, possibly using the older binary 2.6.2 release? If yes, I am interested in buying a used UltraSPARC system. If it has a DVD-ROM and a video board, it should be easy to install L

Re: [fpc-pascal] Verify Method Calls

2016-07-05 Thread tobiasgiesen
Hello, many thanks for your reply! -vh didn't show more info, but I was able to reduce the source to a small program, maybe you can try it? Compiling it with -CR fails, but without it compiles fine without warnings. Unfortunately there are many typecasts like these and I don't know how to solve it.

[fpc-pascal] Verify Method Calls

2016-07-04 Thread tobiasgiesen
Hello, I would like to use "Verify Method Calls" (-CR), but when I choose it in the Lazarus project options under debugging, I get compiler errors such as: Incompatible type for arg no.2: Got "Class Of IZCollection", expected "TClass". With Verify Method Calls off, the same code compiles fine.

Re: [fpc-pascal] FPC 3: disabling automatic AnsiString codepage conversionx

2016-04-06 Thread tobiasgiesen
Hello, Jonas wrote: > If you get ASCII, it means that one of the LC_ALL, LC_CTYPE and/or LANG > environment variables is set to > a setting that corresponds to ASCII (such as "C"), or set to a value that is > not recognised as or translatable into > a Windows code page number. That was it - o

Re: [fpc-pascal] FPC 3: disabling automatic AnsiString codepage conversionx

2016-04-04 Thread tobiasgiesen
> > Terminal has LC_CTYPE=UTF-8. > > What about LC_ALL? My Mac OS installations do not have LC_ALL. But I just noticed that Carbon GUI programs do not get LC_CTYPE in their environment either. So maybe cwstring needs to be fixed for Carbon GUI Mac OS X programs. What I see in the environment

Re: [fpc-pascal] FPC 3: disabling automatic AnsiString codepage conversionx

2016-04-04 Thread tobiasgiesen
> How did you get a codepage 20127 Mac? The Mac is UTF-8, but cwstring or whatever does not realize it. Since I cannot easily step into it with the debugger, I can't tell you why. Terminal has LC_CTYPE=UTF-8. Well I will just set the default codepages manually. Cheers, Tobias

Re: [fpc-pascal] FPC 3: disabling automatic AnsiString codepage conversionx

2016-04-04 Thread tobiasgiesen
> OK, I just confirmed. Adding clocale to my 5-line test program doesn't > affect the DefaultSystemCodePage result, but as soon as I add cwstring > to the uses clause, then DefaultSystemCodePage returns 65001. On Mac, not even cwstring does that. It sets the DefaultSystemCodePage to 20127. So, on

Re: [fpc-pascal] FPC 3: disabling automatic AnsiString codepage conversion

2016-04-04 Thread tobiasgiesen
> > > On Mon, 4 Apr 2016, tobiasgie...@gmail.com wrote: > > >> Your question was not about Lazarus but maybe you should read this: > >> http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus > > > > Very interesting, but apparently there is some wrong info. > > > > It says "On Linux and

Re: [fpc-pascal] FPC 3: disabling automatic AnsiString codepage conversion

2016-04-04 Thread tobiasgiesen
> Your question was not about Lazarus but maybe you should read this: > http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus Very interesting, but apparently there is some wrong info. It says "On Linux and Mac OS X UTF-8 is typically the system codepage, so the RTL uses here by defaul

Re: [fpc-pascal] FPC 3 regression: cannot use TStringList for UTF-8 data any more?

2016-04-04 Thread tobiasgiesen
> That please update the wiki - it is user editable. Done: http://wiki.freepascal.org/FPC_Unicode_support#Backward_compatibility I hope this is correct. Cheers, Tobias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepasca

Re: [fpc-pascal] FPC 3 regression: cannot use TStringList for UTF-8 data any more?

2016-04-04 Thread tobiasgiesen
> > I use TStringList for UTF-8 strings. This is no longer possible, because > > automatic conversions cause question marks and data loss. > > Lazarus uses TStringList with UTF-8 all over the place. > > Please post a complete example demonstrating the problem. Sorry - this was only theoretical,

Re: [fpc-pascal] FPC 3: disabling automatic AnsiString codepage conversion

2016-04-04 Thread tobiasgiesen
> You cannot, but you can set DefaultSystemCodePage to CP_UTF8. > Then no conversions will be done for all ansistrings that contain UTF8. Fantastic. Many thanks. That fixes my problem entirely (I think). Sorry, I was not able to come to that conclusion from the existing docs. Cheers, Tobias __

[fpc-pascal] FPC 3 regression: cannot use TStringList for UTF-8 data any more?

2016-04-04 Thread tobiasgiesen
Hello, disallowing "AnsiString" code for UTF-8 is a huge regression. I use TStringList for UTF-8 strings. This is no longer possible, because automatic conversions cause question marks and data loss. I also use a large amount of third-party libraries that use the AnsiString data type for UTF-8.

[fpc-pascal] Linking FPC units with Visual Studio 2013 projects

2015-08-20 Thread tobiasgiesen
Hello, I have to compile a few Pascal units with FPC and add them to a Visual C++ project. After adding system.o to the Visual C++ project, I get linker errors like this: system.o : error LNK2001: unresolved external symbol _$dll$kernel32$Sleep Apparently the Microsoft linker does not recogniz