Bug 34109 - gforthmi fails with incorrect path
Summary: gforthmi fails with incorrect path
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA9-64-OK,MGA9-32-OK
Keywords: advisory, has_procedure, validated_update
Depends on:
Blocks:
 
Reported: 2025-03-17 02:27 CET by Dan Fandrich
Modified: 2025-03-21 01:33 CET (History)
2 users (show)

See Also:
Source RPM: gforth-0.7.3-10.mga9, gforth-0.7.3-11.mga10
CVE:
Status comment:


Attachments

Description Dan Fandrich 2025-03-17 02:27:05 CET
Description of problem:
Running:
  gforthmi foo bar
returns the error:
/bin/gforthmi: line 47: /usr/lib/gforth/0.7.3/gforth-ditc: No such file or directory
/bin/gforthmi: line 48: /usr/lib/gforth/0.7.3/gforth-ditc: No such file or directory

Running it like this:
  GFORTHD=/usr/lib64/gforth/0.7.3/gforth-ditc gforthmi foo bar
fixes the problem.

The root cause is that the script /usr/bin/gforthmi hard-codes the path component /lib/ on x86_64 instead of /lib64/

Version-Release number of selected component (if applicable):
gforth-0.7.3-10.mga9
gforth-0.7.3-11.mga10

How reproducible:
100%

Steps to Reproduce:
1. run: gforth foo bar
Comment 1 Dan Fandrich 2025-03-17 04:44:38 CET
I have a patch I'll submit tomorrow.

Status: NEW => ASSIGNED
Assignee: bugsquad => dan

Comment 2 Dan Fandrich 2025-03-17 20:29:04 CET
gforth-0.7.3-12.mga10 is available in Cauldron. It easy to fix it in mga9 as well but is it worth it? There is a workaround and this is just one feature that's broken that it seems not many people are using; everything else I've tried in gforth works in the current mga9 version.

Status: ASSIGNED => NEW
Assignee: dan => bugsquad

Comment 3 Lewis Smith 2025-03-19 08:57:01 CET
Thank you for the report - and for fixing it (hence assigning to you).
Ideally, it would be fixed for M9 too, since this is liable to exist for some time. Would not the first user of gforth hit the problem? Would need an advisory.

Source RPM: (none) => gforth-0.7.3-10.mga9, gforth-0.7.3-11.mga10
Assignee: bugsquad => dan

Comment 4 Dan Fandrich 2025-03-19 16:48:01 CET
You're right—I should have just fixed it. I've pushed
gforth-0.7.3-10.1.mga9 to updates_testing. Here is a test procedure:

$ gforthmi --application sokoban.fi /usr/share/gforth/0.7.3/sokoban.fs
$ ./sokoban.fi -e 'application bye'

This will start a little text mode Sokoban game (? for help, q to quit).

Here is a suggested advisory:

Updated gforth packages fix gforthmi bug

An incorrect path caused gforthmi to fail to operate by default on x86_64 and aarch64. This update fixes the issue.

Assignee: dan => qa-bugs
Whiteboard: (none) => has_procedure
Status: NEW => ASSIGNED

katnatek 2025-03-19 19:18:34 CET

Keywords: (none) => advisory

Comment 5 katnatek 2025-03-20 17:36:32 CET
RH x86_64

LC_ALL=C gforthmi --application sokoban.fi /usr/share/gforth/0.7.3/sokoban.fs
/usr/bin/gforthmi: line 47: /usr/lib/gforth/0.7.3/gforth-ditc: No such file or directory
/usr/bin/gforthmi: line 48: /usr/lib/gforth/0.7.3/gforth-ditc: No such file or directory
redefined th  
*OS command line*:-1: No such file or directory
comp-image >>>./temp-image.fi1<<< ./temp-image.fi2 sokoban.fi bye
Backtrace:
$7F0EED9DE860 throw 
$7F0EEDA14298 slurp-file 
chmod: cannot access 'sokoban.fi': No such file or directory
rm: cannot remove './temp-image.fi1': No such file or directory
rm: cannot remove './temp-image.fi2': No such file or directory

in file included from *OS command line*:-1
/usr/share/gforth/0.7.3/make-app.fs:23: No such file or directory
r/w bin open-file >>>throw<<< constant image-file
Backtrace:

installing gforth-0.7.3-10.1.mga9.x86_64.rpm from //home/katnatek/qa-testing/x86_64
Preparing...                     ##################################################################################################
      1/1: gforth                ##################################################################################################
      1/1: removing gforth-0.7.3-10.mga9.x86_64
                                 ##################################################################################################

LC_ALL=C gforthmi --application sokoban.fi /usr/share/gforth/0.7.3/sokoban.fs
redefined Level with level  redefined Level with level  redefined th  data offset=12E4B711C0 
code offset=12E980D0 
  xt offset=12E980B0 
       60     7F5E82699000     7F716720A000
       68     7F5E8269E000     7F716720F000
       70     7F5E826A3000     7F7167214000
       78     7F5E826A8000     7F7167219000
     2F58     7F5E8269D000     7F716720E000
     2F60     7F5E826A6C00     7F7167217C00
     2F68     7F5E826A2000     7F7167213000
     2F78     7F5E826A6B30     7F7167217B30
     2F80     7F5E826A6B28     7F7167217B28
     2F98          1576A10         1440EA10
     4DC0     7F5E8259F760     7F7167110760
     4DF8     7F5E8259EA80     7F716710FA80
    10C70     7FFDBC04C600     7FFF98A15DF0
    10CD8     7FFDBC04C838     7FFF98A16028
    11B80          155DB30         143F5B30
    13958          1576CA0         1440ECA0
    1CB80          156BA70         14403A70
    1CC20          155E2A0         143F62A0
    27E50          1551740         143E9740
    2BE38          156E2E0         144062E0
    3CB20          15765F0         1440E5F0

./sokoban.fi -e 'application bye'

*OS command line*:-1: Undefined word
>>>application<<< bye
Backtrace:
$7F1587079A00 throw 
$7F158708FC90 no.extensions 
$7F1587079CC0 interpreter-notfound1 

Is this expected?

The application builds but something is wrong, bug in code or other place?
Comment 6 Dan Fandrich 2025-03-20 18:50:53 CET
The "redefined…" messages are expected but not the other errors. I'll take a look.
Comment 7 Dan Fandrich 2025-03-20 18:55:10 CET
Argghhh… I mixed up the instructions with those for another reproducer I was originally going to use—sorry about that. The correct reproductions steps are:

$ gforthmi --application sokoban.fi /usr/share/gforth/0.7.3/sokoban.fs
$ ./sokoban.fi -e 'sokoban bye'
Comment 8 Dan Fandrich 2025-03-20 18:57:04 CET
One other note—I haven't actually tried the new package on a 32-bit arch (i586 or arm7). It should work, but it's probably worth checking if it's not too hard to do so since the library path is different in that case.
Comment 9 katnatek 2025-03-20 19:06:28 CET
OK with the new test work
As the errors /usr/bin/gforthmi: line 47: /usr/lib/gforth/0.7.3/gforth-ditc: No such file or directory are gone , I give OK

CC: (none) => andrewsfarm
URL: (none) => MGA9-64-OK

katnatek 2025-03-20 19:49:56 CET

Whiteboard: has_procedure => has_procedure,MGA9-64-OK
URL: MGA9-64-OK => (none)

Comment 10 Thomas Andrews 2025-03-20 20:34:37 CET
"has_procedure" needs to be in the Keywords field to show in madb.

Keywords: (none) => has_procedure
Whiteboard: has_procedure,MGA9-64-OK => MGA9-64-OK

Comment 11 Thomas Andrews 2025-03-20 20:44:08 CET
(In reply to Dan Fandrich from comment #8)
> One other note—I haven't actually tried the new package on a 32-bit arch
> (i586 or arm7). It should work, but it's probably worth checking if it's not
> too hard to do so since the library path is different in that case.

Validation waiting on a successful i586 test.
Comment 12 katnatek 2025-03-20 21:54:09 CET
RH i586

LC_ALL=C urpmi gforth
To satisfy dependencies, the following packages are going to be installed:
  Package                        Version      Release       Arch    
(medium "QA Testing (32-bit)")
  gforth                         0.7.3        10.1.mga9     i586    
(medium "Core Release (distrib1)")
  libtool                        2.4.7        1.mga9        i586    (recommended)
3.1MB of additional disk space will be used.
942KB of packages will be retrieved.
Proceed with the installation of the 2 packages? (Y/n) y


    https://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/9/i586/media/core/release/libtool-2.4.7-1.mga9.i586.rpm
installing /var/cache/urpmi/rpms/libtool-2.4.7-1.mga9.i586.rpm                                                           
//home/katnatek/qa-testing/i586/gforth-0.7.3-10.1.mga9.i586.rpm
Preparing...                     #######################################################################################
      1/2: libtool               #######################################################################################
      2/2: gforth                #######################################################################################

gforthmi --application sokoban.fi /usr/share/gforth/0.7.3/sokoban.fs
redefined Level with level  redefined Level with level  data offset=-F20 
code offset=-CC1F98 
  xt offset=-CC1FA8 
       30         B7EFD000         B7EFC000
       34         B7F02000         B7F01000
       38         B7F07000         B7F06000
       3C         B7F0C000         B7F0B000
     1CCC         B7F01000         B7F00000
     1CD0         B7F0AC00         B7F09C00
     1CD4         B7F06000         B7F05000
     1CDC         B7F0AB98         B7F09B98
     1CE0         B7F0AB94         B7F09B94
     1CEC          9BE3D40          8F21D40
     2D40         B7DE2D80         B7DE1D80
     2D60         B7DE2600         B7DE1600
     970C         BF833660         BFD47810
     9748         BF8337FC         BFD479AC
     9F88          9BD31A0          8F111A0
     B1AC          9BE3EF0          8F21EF0
    10480          9BD9E70          8F17E70
    104E0          9BD3760          8F11760
    16D40          9BCC2E0          8F0A2E0
    19068          9BDB7A0          8F197A0
    22378          9BE3930          8F21930

./sokoban.fi -e 'sokoban bye'
Works

Whiteboard: MGA9-64-OK => MGA9-64-OK,MGA9-32-OK

Comment 13 Thomas Andrews 2025-03-20 22:50:53 CET
Thank you. Validating.

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 14 Mageia Robot 2025-03-21 01:33:32 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2025-0032.html

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.