Forum > Ported from Delphi/Kylix

Problem installing Indy on Laz4android

<< < (2/2)

Remy Lebeau:

--- Quote from: PascalDragon on June 25, 2020, 08:57:10 pm ---The iconvenc package is not enabled for target Android

--- End quote ---


--- Quote from: PascalDragon on June 25, 2020, 08:57:10 pm ---so bmcsoft will have to manually compile unit iconvenc located in $fpcdir/packages/iconvenc/src.

--- End quote ---

Is there another way in FPC that Indy (or in general, any user code) can use iconv on Android, without resorting to accessing the iconv library manually?  Indy needs access to a text encoding library, and on Nix platform (which includes Android) that is currently iconv.

Remy Lebeau:

--- Quote from: bmcsoft on June 26, 2020, 06:38:48 pm ---Compiler critically stopped on module IDGlobal.pas, indicates "iconvenc not found", but when I click on "iconvenc"-string in IDGlobal.pas it opens unit iconvenc.pas from c:\Android\laz4android\fpc\3.0.4\source\packages\iconvenc\src\

--- End quote ---

That has nothing to do with Indy itself.  That is a FPC/Lazarus issue.

--- Quote from: bmcsoft on July 08, 2020, 05:08:34 pm ---Remy Lebeau, you should to modify Indy10 to compile on Laz4android.

--- End quote ---

And how would you propose I do that exactly?  Considering that FPC/Lazarus is the one missing the needed functionality in this situation, not Indy.  iconv is a system library, Indy needs access to it.  And while Indy does have its own IdIconv.pas unit, it is not currently setup for Android, and I would like to avoid using that unit if possible.

--- Quote from: bmcsoft on July 08, 2020, 05:08:34 pm ---Your advices do not solve the problem, I described.

--- End quote ---

Then you need to fix THAT problem, and stop blaming Indy.  You already recompiled the iconvenc unit, like PascalDragon told you to.  So now you just need to figure out how to get FPC/Lazarus to find the PPU file you compiled.  That is a separate issue.

--- Quote from: bmcsoft on July 08, 2020, 05:08:34 pm ---How to use my created ppu-file and remove link to pas-file, that can't compile anytime?

--- End quote ---

I can't answer that, as I don't use FPC/Lazarus myself.  Someone else in the FreePascal community will have to address that for you.  All of Indy's FPC/Lazarus support has been through contributions from the FreePascal community.

--- Quote from: bmcsoft on July 08, 2020, 05:08:34 pm ---Network components "Synapse" compiled today on Laz4android perfectly.

--- End quote ---

Good for them.  They don't have the same functionality that Indy has, especially when it comes to Unicode text handling, which is very important in many modern Internet protocols.

--- Quote from: bmcsoft on July 08, 2020, 05:08:34 pm ---So I have to delete all Indy10 components from my project and rewrite the code to use "Synapse".

--- End quote ---

Or,  you could just fix the issue with the iconvenc unit and move on.

Remy Lebeau, thanks for explanations.

PascalDragon, could anyone from Lazarus-team help me to compile Indy10 and projects with it on Laz4android?

Compiler permanently linked to "iconvenc.pas" and I don't know how to replace it with manually compiled unit (ppu).

I guess to add link to PPU-directory in Compiler Parameters - Other Modules.
One problem is gone, but other problem is still.

When I add IdUDPServer, IdGlobal in uses section I get critical error too.

--- Quote ---C:\Android\android-ndk-r14b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\bin\arm-linux-androideabi-ld.bfd.exe: cannot find -liconv
controls.lpr(632,15) Error: Error while linking
--- End quote ---

When I remove this modules from uses section, application compiled normally.


It's hard to understand what's wrong.

Remy Lebeau:
I wonder - does FPC's libc unit have iconv definitions on Android?

For comparison, Delphi uses ICU instead of ICONV for its own text conversions under Android.  I wonder if they did that because ICONV has issues under Android?  There is already an open ticket for Indy to add support for ICU because of that.


[0] Message Index

[*] Previous page

Go to full version