fmd-project-team / FMD

The new FMD fork! Join our community on Discord!
https://discord.gg/cXKKgw3
GNU General Public License v2.0
263 stars 33 forks source link

Lazarus: Installing Multilog & InternetTools from git, compiler error #973

Open Gkjsdll opened 4 years ago

Gkjsdll commented 4 years ago

I don't think this is the right place to post this, but I'm not sure where would be better.

I've got Lazarus installed & all other packages / components installed, but I'm sure I've done MultiLog & InternetTools incorrectly. For both packages, I downloaded a copy of their code from GitHub at the specified commits, and opened with Package > Open Package File (.lpk)

MultiLog also referenced an outputchannel.pas which did not exist locally or in the repo, so I had to remove the reference to make Use > Install work.

InternetTools warns about not having a "Register" procedure & throws errors when I attempt to proceed with the install.

Separate from the package issues, opening the FMD project with Lazarus throws the following error:

Compiler "C:\lazarus\fpx\3.0.4\bin\x86_64-win64\fpx.ece" does not support target i386-win32

I'm running Windows 10 64bit if that's helpful.

Lastly, almost certainly a symptom of the other issues, I attempting to run the project produces the following error:

Error: ppc386.exe can't be executed, error message: Failed to execute ""ppc386.exe" -Twin32 -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -FuC:\lazarus\packager\registration\ -FUC:\lazarus\packager\units\i386-win32\ fcllaz.pas

dazedcat19 commented 4 years ago

you're trying to compile targeting i386-win32 with fpc x86_64-win64. you need a cross-compiler for that. lazarus team usually provide the cross compiler setup for that. just download and install it. or build fpc from source make all crossinstall OS_TARGET=win32 CPU_TARGET=i386

Gkjsdll commented 4 years ago

I've now addressed the compiler error by changing the following settings in Project > Project Options > Compiler Options > Config and Target: Build modes: Win32 -> Win64 Target OS (-T): Win32 -> Win64 Target CPU family (-P): i386 -> x86_64

I still haven't resolved the issues with installing Multilog & InternetTools, but I'll push on it some more this weekend & follow up either way.

dazedcat19 commented 4 years ago

For multilog just remove the nonexistent file with package inspector. Internettools use FLRE and PUCU by Benyamin Rosseaux. https://github.com/BeRo1985 You can use Sorokin's regex that came with lazarus by adjusting the defines. But I strongly suggest just use FLRE. The author favoring FLRE over RegExprs. There's a memory leaks when using Regexpr. I did report it multiple times in the past. but it keep coming back. The author never really check the compatibility with regexpr in deep. So bugs expected when he make a change. You can see in the past FMD use internettools with regexpr. There's a defines in old fmd for regexpr, just search it. But better use something more stable. Just copy FLRE.pas and PUCU.pas in internettools/data folder.