Static extensions: not building

I was building with -DSTATIC_EXTENSIONS and got the following error:

[ 87%] Building C object src/CMakeFiles/swiplobjs.dir/pl-op.c.o
In file included from /tmp/swipl-devel/src/pl-load.c:409:
/tmp/swipl-devel/build.centos/src/static_packages.h: In function ‘activate_static_extension’:
/tmp/swipl-devel/build.centos/src/static_packages.h:40:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘-’ token
   40 | extern void install_sweep-module(void);
      |                          ^
/tmp/swipl-devel/build.centos/src/static_packages.h:40:27: warning: implicit declaration of function ‘module’ [-Wimplicit-function-declaration]
   40 | extern void install_sweep-module(void);
      |                           ^~~~~~
/tmp/swipl-devel/build.centos/src/static_packages.h:40:34: error: expected expression before ‘void’
   40 | extern void install_sweep-module(void);
      |                                  ^~~~
/tmp/swipl-devel/build.centos/src/static_packages.h:95:21: error: ‘install_sweep’ undeclared (first use in this function); did you mean ‘install_sched’?
   95 |   { "sweep-module", install_sweep-module },
      |                     ^~~~~~~~~~~~~
      |                     install_sched
/tmp/swipl-devel/build.centos/src/static_packages.h:95:21: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [src/CMakeFiles/swiplobjs.dir/build.make:286: src/CMakeFiles

It can be fixed by disabling emacs, but wanted to point it out.

Thanks. Disabled sweep when building with static extensions. sweep depends on dynamic linking. Anyway, I’d assume one uses the static extension mechanism for deployment while sweep is for development.

1 Like