Welcome, Guest
Username: Password: Remember me
CodeTyphon Cross-Build Development, discussions and problems
  • Page:
  • 1

TOPIC:

Cross compile smart linking issues on Win64 for RPI3 5 years 3 months ago #12946

  • Sanogo
  • Sanogo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0

  • Hi, I installed CT 6.6 (latest stable version on Windows) and tried to cross compile a very simple sample project from Windows to RPI3 using FPC32.
    When I compile in Debug mode, everything works fine but when I try to compile in Release mode, compilation fails with a certain error message about linking.
    I narrowed down the issue to smartlinking when cross compiling from Win64 to RPI3 using the FPC32 compiler.
    If I disable smartlinking in Release mode, everything including linking works beautifully.
  • Please Log in or Create an account to join the conversation.

    Cross compile smart linking issues on Win64 for RPI3 5 years 3 months ago #12949

    • Sanogo
    • Sanogo's Avatar Topic Author
    • Offline
    • New Member
    • New Member
    • Posts: 8
    • Thank you received: 0
    Any help guys?

    Please Log in or Create an account to join the conversation.

    Cross compile smart linking issues on Win64 for RPI3 5 years 3 months ago #12950

    • Sternas Stefanos
    • Sternas Stefanos's Avatar
    • Offline
    • Moderator
    • Moderator
    • Ex Pilot, M.Sc, Ph.D
    • Posts: 4506
    • Thank you received: 1100
    Thanks Sir
    can you give us more info for you project ?
    PilotLogic Architect and Core Programmer

    Please Log in or Create an account to join the conversation.

    Cross compile smart linking issues on Win64 for RPI3 5 years 3 months ago #12951

    • Sanogo
    • Sanogo's Avatar Topic Author
    • Offline
    • New Member
    • New Member
    • Posts: 8
    • Thank you received: 0

    Sternas Stefanos wrote: Thanks Sir
    can you give us more info for you project ?


    Thanks for replying Sir, it's just a simple Lazarus Form Project. See it attached below

    Please Log in or Create an account to join the conversation.

    Cross compile smart linking issues on Win64 for RPI3 5 years 3 months ago #12953

    • Sternas Stefanos
    • Sternas Stefanos's Avatar
    • Offline
    • Moderator
    • Moderator
    • Ex Pilot, M.Sc, Ph.D
    • Posts: 4506
    • Thank you received: 1100
    Sir
    your project don't define arm-linux Platform more Info
    for Pi3 my suggestion is GTK2

    So, you build your project for Pi3 arm-linux but for Win32 Platform
    with all Debug, Release and Default modes of your project.

    CodeTyphon Form applications have TargetCPU, TargetOS and TargetPlatform
    PilotLogic Architect and Core Programmer

    Please Log in or Create an account to join the conversation.

    Last edit: by Sternas Stefanos.

    Cross compile smart linking issues on Win64 for RPI3 5 years 3 months ago #12955

    • Sanogo
    • Sanogo's Avatar Topic Author
    • Offline
    • New Member
    • New Member
    • Posts: 8
    • Thank you received: 0
    Hi, I followed your suggestions yet the problem remains, please do note that the project builds and links fine if I select debug mode or disable the "Link smart (-XX) option in Release mode, but if I enable "Link smart (-XX) option in any build mode, linking fails.
    I have repeated it over and over again.

    Please Log in or Create an account to join the conversation.

    Cross compile smart linking issues on Win64 for RPI3 5 years 3 months ago #12956

    • Sanogo
    • Sanogo's Avatar Topic Author
    • Offline
    • New Member
    • New Member
    • Posts: 8
    • Thank you received: 0

    Sternas Stefanos wrote: Sir
    your project don't define arm-linux Platform more Info
    for Pi3 my suggestion is GTK2

    So, you build your project for Pi3 arm-linux but for Win32 Platform
    with all Debug, Release and Default modes of your project.

    CodeTyphon Form applications have TargetCPU, TargetOS and TargetPlatform


    attached below is image proof.

    Please Log in or Create an account to join the conversation.

    Cross compile smart linking issues on Win64 for RPI3 5 years 3 months ago #12957

    • Sternas Stefanos
    • Sternas Stefanos's Avatar
    • Offline
    • Moderator
    • Moderator
    • Ex Pilot, M.Sc, Ph.D
    • Posts: 4506
    • Thank you received: 1100
    So, you want "Smart Link" in a CrossBuild procedure ?
    PilotLogic Architect and Core Programmer

    Please Log in or Create an account to join the conversation.

    Cross compile smart linking issues on Win64 for RPI3 5 years 3 months ago #12958

    • Sanogo
    • Sanogo's Avatar Topic Author
    • Offline
    • New Member
    • New Member
    • Posts: 8
    • Thank you received: 0

    Sternas Stefanos wrote: So, you want "Smart Link" in a CrossBuild procedure ?


    Yes, is this not possible?
    Because it works for me if I try to smartlink when crossbuilding from Win32 to normal Linux (not ARM).

    Please Log in or Create an account to join the conversation.

    Cross compile smart linking issues on Win64 for RPI3 5 years 3 months ago #12959

    • Sternas Stefanos
    • Sternas Stefanos's Avatar
    • Offline
    • Moderator
    • Moderator
    • Ex Pilot, M.Sc, Ph.D
    • Posts: 4506
    • Thank you received: 1100
    OK, we will try fix this Sir
    PilotLogic Architect and Core Programmer
    The following user(s) said Thank You: Sanogo

    Please Log in or Create an account to join the conversation.

    Cross compile smart linking issues on Win64 for RPI3 5 years 3 months ago #12960

    • fredvs
    • fredvs's Avatar
    • Offline
    • Junior Member
    • Junior Member
    • Posts: 205
    • Thank you received: 1
    Hello.

    Did you try to add this parameter at compilation:
    -k--gc-sections

    AFAIK, this parameter is omitted sometime with fpc if
    -XX
    is used.

    For example, if you compile libraries with
    -XX
    smart-linking will not work, you must use
    -k--gc-sections
    parameter to enable smart-linking.

    Fre;D

    Please Log in or Create an account to join the conversation.

    Last edit: by fredvs.

    Cross compile smart linking issues on Win64 for RPI3 5 years 3 months ago #12961

    • Sanogo
    • Sanogo's Avatar Topic Author
    • Offline
    • New Member
    • New Member
    • Posts: 8
    • Thank you received: 0

    fredvs wrote: Hello.

    Did you try to add this parameter at compilation:

    -k--gc-sections

    AFAIK, this parameter is omitted sometime with fpc if
    -XX
    is used.

    For example, if you compile libraries with
    -XX
    smart-linking will not work, you must use
    -k--gc-sections
    parameter to enable smart-linking.

    Fre;D


    Thanks for the help but unfortunately, it didn't work.

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1