Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • FPC Source FPC Source
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1,277
    • Issues 1,277
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 57
    • Merge requests 57
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Scheduled maintenance on the database layer will take place on 2022-07-02. We expect GitLab.com to be unavailable for up to 2 hours starting from 06:00 UTC. Kindly follow our status page for updates and read more in our blog post.

  • FPC
  • FPC
  • FPC SourceFPC Source
  • Issues
  • #26454
Closed
Open
Created Jul 05, 2014 by FPC Admin account@fpc_adminOwner

FPC program can't load a FPC shared library on armhf-linux (RPi)

Original Reporter info from Mantis: papelhigienico
  • Reporter name: Fabio Luis Girardi

Description:

A program built in FPC can't load a shared library built in FPC, both built to armhf for Raspberry Pi. Tested trying to load the shared library dynamically and statically. When tried to load the shared library dynamically, I tried two ways, one using dynlibs unit and other using dl unit, both resulting the same error.

Tested with various FPC versions:

  1. FPC 2.6.0 from Raspbian wheezy 2014-06-20 repository
  2. FPC 2.7.1 from http://freepascal.thaddy.co.uk/raspberrypi.html on Raspbian Wheezy 2014-06-20
  3. FPC 2.7.1 trunk on Raspbian wheezy 2014-06-20 built using the FPC 2.7.1 from item 2.

-> On both Raspbian settings, dlerror() says that can't load the shared library.

  1. FPC 2.7.1 from http://freepascal.thaddy.co.uk/raspberrypi.html on latest ArchLinux

-> On ArchLinux, dlerror() says that a Internal Error happened.

On Raspbian, using configurations 1, 2 and 3, a program built in FPC can load a shared library built in GCC without errors.

On Raspbian 2013-05-29-wheezy-ARMEL, program and shared library works fine.

Steps to reproduce:

Compile the attached file on a armhf and run the program "program1".

The gcc library was built with this command line:

gcc -c -Wall -Werror -fpic teste.c
gcc -shared -o libteste.so teste.o

FPC Program and shared library was built with this:

fpc teste.fpr
fpc program1.fpr

Additional information:

On a x86_64-linux and i386-linux, the attached example compile and works fine.

Mantis conversion info:

  • Mantis ID: 26454
  • OS: linux
  • OS Build: latest
  • Build: 2.7.1
  • Platform: armhf
  • Version: 2.6.4
  • Fixed in version: 3.3.1
  • Fixed in revision: 43162 (#29bdbdba)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking