Couldn't get "sfText_getLineSpacing" from "libcsfml-graphics.so"

Bug #1877632 reported by NickW
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libcsfml (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Distro: Ubuntu Focal Fossa
Arch: x86_64
Package: libcsfml-graphics2.5 version 2.5-1build1

Problem: the library does not export the function sfText_getLineSpacing, which it should. This prevents code using the library from working fully (or in my case, at all).

As I understand it, this is a known problem, and has been fixed upstream in CSFML. See:

https://github.com/massung/r-cade/issues/5
https://r-cade.io/faq
https://github.com/SFML/CSFML/pull/130/files

To replicate, in my case:
- apt-get install racket libcsfml-*
- raco pkg install r-cade
- create a file test.rkt
- paste into it the music example from tutorial page here: https://r-cade.io/tutorials
- Run it using `racket test.rkt`

For completeness, the example code is:

```
    (require r-cade)

    ;; create a song
    (define theme
      (music "E4-B3C4D-CB3A-AC4E-DCB3-C4D-E-C-A3-A-.D4-FA-GFE-CE-DCB3-BC4D-E-C-A3-A-."
             #:tempo 280))

    (define (game-loop)
      (text 2 2 "Playing the Tetris theme song.")
      (wait)
      (quit))

    (define (start-music)
      (play-music theme))

    (run game-loop 128 128 #:init start-music)
```

This fails unexpectedly with the following output:

```
ffi-obj: couldn't get "sfText_getLineSpacing" from "libcsfml-graphics.so" (/lib/x86_64-linux-gnu/libcsfml-graphics.so: undefined symbol: sfText_getLineSpacing)
  context...:
   /usr/share/racket/collects/ffi/../racket/private/more-scheme.rkt:261:28
   /usr/share/racket/collects/ffi/unsafe.rkt:216:2: get-ffi-obj*
   "/home/nick/.racket/7.2/pkgs/csfml/graphics.rkt": [running body]
   temp37_0
   for-loop
   run-module-instance!125
   for-loop
   [repeats 1 more time]
   run-module-instance!125
   for-loop
   [repeats 1 more time]
   run-module-instance!125
   for-loop
   [repeats 1 more time]
   run-module-instance!125
   perform-require!78
```

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libcsfml - 2.5.2-1

---------------
libcsfml (2.5.2-1) unstable; urgency=medium

  * New upstream release.
    - Fix declaration of sfText_getLineSpacing. (LP: #1877632)

  * d/copyright: Update dates.
  * d/control:
    - Use debhelper 13.
    - Drop useless cmake version restriction.
    - Remove dependencies on obsolete GL packages.
    - Bump standards version to 4.6.2.
  * d/patches:
    - Graphics/Texture: Restore sfTexture_setSrgb for ABI compatibility.
  * d/*.symbols: Add new symbols.
  * d/tests: Replace $ADTTMP with $AUTOPKGTEST_TMP.
  * d/upstream: Add upstream metadata file.
  * d/watch: Use version 4

 -- James Cowgill <email address hidden> Thu, 30 Nov 2023 15:56:02 +0000

Changed in libcsfml (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.