Skip to content

Cannot load kernel extensions built against non-install GAP into an executable built against libgap #5232

Closed
@dimpase

Description

libgap is broken in the current master and in 4.12.1 (but still OK on 4.11.1) on macOS 13.0.1 if io is built, as can be seen by running
tst/testlibgap/basic: (which is built by make testlibgap, for instance)

% ./tst/testlibgap/basic -l .
# Initializing GAP...
 ┌───────┐   GAP 4.13dev-169-g28d5faa built on 2022-11-30 18:44:58+0000
 │  GAP  │   https://www.gap-system.org
 └───────┘   Architecture: x86_64-apple-darwin22-default64-kv8
 Configuration:  gmp 6.2.1, GASMAN, readline
 Loading the library and packages ...
Error, LOAD_DYN: failed to load kernel module ./pkg/io//bin/x86_64-apple-darwin2\
2-default64-kv8/io.so, dlopen(./pkg/io//bin/x86_64-apple-darwin22-default\
64-kv8/io.so, 0x0005): Symbol not found: _AssGVar
  Referenced from: <691ED98B-03DB-3A1C-98A6-D5307CB4FCF6> /Users/dima/sof\
tware/gap/pkg/io/bin/x86_64-apple-darwin22-default64-kv8/io.so
  Expected in:     <6EA6D1DA-9BAB-322E-AEE4-887EFCA0E1EF> /Users/dima/sof\
tware/gap/tst/testlibgap/.libs/basic in
  LOAD_DYN( filename ) at ./lib/files.gd:595 called from 
<function "LoadDynamicModule">( <arguments> )
 called from read-eval loop at ./pkg/io//init.g:23
Error, was not in any namespace at ./lib/variable.g:269 called from
LEAVE_NAMESPACE(  ); at ./lib/package.gi:1327 called from
ReadPackage( pkgname, "init.g" ); at ./lib/package.gi:1688 called from
LoadPackage( pair[1], pair[2], false ) at ./lib/package.gi:1933 called from
func(  ); at ./lib/system.g:228 called from
<function "CallAndInstallPostRestore">( <arguments> )
 called from read-eval loop at ./lib/init.g:700
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk> 

On linux this works fine:

$ ./tst/testlibgap/basic -l .
# Initializing GAP...
 ┌───────┐   GAP 4.13dev-169-g28d5faa built on 2022-11-30 21:48:54+0000
 │  GAP  │   https://www.gap-system.org
 └───────┘   Architecture: x86_64-pc-linux-gnu-default64-kv8
 Configuration:  gmp 6.2.1, GASMAN, readline
 Loading the library and packages ...
 Packages:   AClib 1.3.2, Alnuth 3.2.1, AtlasRep 2.1.6, AutPGrp 1.11, CRISP 1.4.5, Cryst 4.1.25, CrystCat 1.1.10, CTblLib 1.3.4, FactInt 1.6.3, FGA 1.4.0, Forms 1.2.9, GAPDoc 1.6.6, genss 1.6.8, IO 4.8.0, 
             IRREDSOL 1.4.4, LAGUNA 3.9.5, orb 4.9.0, Polenta 1.3.10, Polycyclic 2.16, PrimGrp 3.4.2, RadiRoot 2.9, recog 1.4.2, ResClasses 4.7.3, SmallGrp 1.5.1, Sophus 1.27, SpinSym 1.5.2, TomLib 1.2.9, 
             TransGrp 3.6.3, utils 0.78
 Try '??help' for help. See also '?copyright', '?cite' and '?authors'
gap> 

Originally posted by @dimpase in #5230 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions