Error in c-stack.c mod-plugin-builder ./bootstrap.sh moddwarf

I’ve reinstalled my OS moving to Ubuntu 22.04 and hit an issue with a fresh install of the mod-plugin-builder project’s bootstrap.sh script. To be fair the error is not in the script but in one of the packages which it is pulling into the workdir. So the error is in the C file:

mod-workdir/moddwarf/build/host-m4-1.4.17/lib/c-stack.c

And the error is:

c-stack.c:55:26: error: missing binary operator before token "("
   55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
      |                          ^~~~~~~~
c-stack.c:135:8: error: variably modified 'buffer' at file scope
  135 |   char buffer[SIGSTKSZ];
      |        ^~~~~~

I’ve commented out the whole section of code, which clears the error but I’m not sure that’s not going to make a broken toolchain so don’t want to use that to build my plugins as I might be chasing errors in my plugins but it’s the faulty toolchain which I built:

#ifndef SIGSTKSZ
# define SIGSTKSZ 16384
#elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
/* libsigsegv 2.6 through 2.8 have a bug where some architectures use
   more than the Linux default of an 8k alternate stack when deciding
   if a fault was caused by stack overflow.  */
# undef SIGSTKSZ
# define SIGSTKSZ 16384
#endif

So I’m wondering if anyone else has hit that issue and what the recommended fix is? Thanks for any advice.

1 Like

Anything that you setup differently? We can’t reproduce this

1 Like

Oh man that’s not good, ball back in my court.

Thanks a million for taking a look I’ll go back to Ubuntu 20.04 and try to install it and see if that works. That worked previously for me. I’ll then try install Ubuntu 22.04 and see how that pans out.

This might be related: to get around the issue I just defined the variable to ‘#define SIGSTKSZ 16384’ and the toolchain got installed but when I built a plugin I got a strange error:

unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stderr@@GLIBC_2.17'

That’s a linker error and I say strange as my code ain’t trying to define that symbol so I assume it’s some of the toolchain library files and not happy with the version of some of the Ubuntu 22.04 tools. I’ll go back to Ubuntu 20.04 and report back.

Thanks again

2 Likes

before you revert to 20.04, you might be interested in trying the containerized version of plugin-builder. But, I understand there are reasons to stick with the non-container version.

Here’s a set of prebuilt targets (duo, duox, dwarf)

https://hub.docker.com/r/cbix/mod-plugin-builder/tags

1 Like

I recently installed 22.04 on the laptop and did not have an issue there.
So something weird is going on.

For which target did you try? duox or dwarf?

2 Likes

OK I’ve been back to Ubuntu 20.04 and the build system installs correctly without issue. Back to Ubuntu 22.04 and I have changed the dependencies installed from the web page [1]. Basically the list of packages to install there includes the package ‘python’ which is no long a valid package name in Ubuntu 22.04. So I changed that dependency to the two packages ‘python3’ & ‘python-is-python3’.

So with that change and a bootstrap for moddwarf:

$ ./bootstrap.sh moddwarf

I get the error again. There are no other packages yet installed on this installation of Ubuntu 22.04. The reason I upgraded is for better pipewire support. I’ve not installed those packages yet on this fresh install so that’s not the issue.

I’ll try work around it as my heart is set on pipewire.

[1] https://github.com/moddevices/mod-plugin-builder

2 Likes