Embarcadero/python4delphi

FMX Linux 64 compilation issue

Closed this issue · 13 comments

This may be a problem with Delphi 11.1 Trail and FMXLinux Trial - won't know for sure until @jimmckeeth supplies a key

The FMX components of this package fail to compile under Linux as fmx and bindcompfmx can't be found by PythonFmx.dproj

Using WSL I searched for the bindcompfmx package and find it's missing under Linux but present for other FMX targets.

As I say, this may be a Trial issue (although Trial should be functional too really)

I was able to work around the issue by changing the dproj slightly causing implicit import warnings x 111 like this...

{$IFNDEF LINUX64}
fmx,
bindcompfmx,
{$ENDIF}

There is no Linux target assigned for PythonFmx so my first installation just skipped over it but this resuled in PythonGUIInputOutput not being found by my test project (which I tracked down to this cause)

After fixing this one everything else complained about newer version of PythonEngine so had to recompile all the other stuff as well - on the bright side the result was a working test project

You must install the FMXLinux extension using the GetIt package manager, once the FMX for Linux is not available with the default Delphi distribution.

Can't do that in Trial - not sorted out a proper license yet (JMK)
There's a trial download on fmxlinux.com though

Now have 'proper' Delphi 11.2 so just tried installing Linux on that + installed FMXLinux from Gettit

Problem (and workaround) persist.

fmx-warnings.txt

Looking into the issue now to see if I can resolve it.

This issue only appears if you enable Linux 64 bit for FMXPython.dpk. This is not enabled by default and only becomes a problem if you try using a component from FMX Python such as PythonGUIInputOutput (which I regularly use)

If you're only testing functionality of the rest of the library you'd miss this problem

I can't reproduce this issue.

Oh, I think I understood. FMXLinux doesn't provide a bpl to link as dependency. You must set the P4D source paths for linux, instead.

Actually there's a FMX bpl (but it's missing two - bindcomp in addition to fmx)

This may also explain why Android don't work.

My Tutorial needs updating...

How annoying, I'm going to have to re-build the entire P4D set 7 times (a total of 70 builds)

This explains why P4D Android worked under CE

I got the circular references thing there as well (from another Issue) which must also be related to having the source in path.

bindcomp and fmx are not provided as part of FMXLinux.

Having source in path is not related to circular references.

fmx.bpl is in $(BDSCatalogRepositoryAllUsers)\FmxLinux-1.71\Lib\Release
bplfmx280.so is in Redist

AKA

C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\FmxLinux-1.71\Lib\Release
C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\FmxLinux-1.71\Redist

There is no fmx.bpl in \FmxLinux-1.71\Lib\Release. The fmx.bpl is provided as part of the Delphi FMX library. Once it is not compiled for Linux, we don't have it available in the Delphi internals.

What you have in redist is a shared library. No fmx.bpl for FMXLinux at all. They only provide source code, no project, no libraries...

Adding $(BDSCatalogRepositoryAllUsers)\FmxLinux-1.71\Redist To the Release and Debug Library paths while leaving fmx as a required is a lot better leaving only bindcomp a problem

Removing bindcomp required gets us to [DCC Warning] PythonFmx.dpk(68): W1033 Unit 'Fmx.Bind.Navigator' implicitly imported into package 'PythonFmx'

I can live with that (a lot better than 111 warnings)

This does mean that PythonFmx.dproj needs to have this mod...

{$IFNDEF LINUX}
bindcompfmx,
{$ENDIF}

=================================

Now - Android... wonder if that is also fixable

What are you issuing in Android?

Fixed it - see #37