GTkorvo / dill

DILL provides instruction-level code generation, register allocation and simple optimizations for generating executable code directly into memory regions for immediate use.
Other
5 stars 6 forks source link

DILL_MULTI_TARGET=ON doesn't build with GCC 14 #50

Closed felixonmars closed 3 months ago

felixonmars commented 3 months ago

Building current master with GCC 14.1.1 fails with the following errors:

/root/dill/dill_sparc.c: In function ‘gen_sparc_jump_table’:
/root/dill/dill_sparc.c:967:27: error: assignment to ‘jmp_opa’ {aka ‘void (*)(struct dill_stream_s *, void *)’} from incompatible pointer type ‘void (*)(struct dill_stream_s *, long unsigned int)’ [-Wincompatible-pointer-types]
  967 |     sparc_jump_table->jpi = sparc_jump_to_imm;
      |                           ^
/root/dill/dill_sparc.c:973:29: error: assignment to ‘call_opi’ {aka ‘int (*)(struct dill_stream_s *, int,  void *, const char *)’} from incompatible pointer type ‘int (*)(struct dill_stream_s *, int,  void *, char *)’ [-Wincompatible-pointer-types]
  973 |     sparc_jump_table->calli = sparc_calli;
      |                             ^
make[2]: *** [CMakeFiles/dill.dir/build.make:231: CMakeFiles/dill.dir/dill_sparc.c.o] Error 1
felixonmars commented 3 months ago

Update: I have reproduced the same errors on x86_64 as well, so it's not limited to riscv64.

eisenhauer commented 3 months ago

Is there a specific reason that you're trying to use DILL_MULTI_TARGET=on? Dill is an old research package and the DILL_MULTI_TARGET dates from an era when it was used to generate code that would be moved to other platforms, for example downloading to a compute-capable network interface card. That option hasn't been used in a long time, and trying to use it makes DILL try to build target architectures that haven't been updated for a long time (like sparc).

felixonmars commented 3 months ago

I am trying to build and package adios2 on Arch Linux riscv64, and adios2 chose to vendor dill. It seems to hard depend on dill because their cmake fails after dill's "NO DILL LIBRARY WILL BE BUILT, but this is not a failure` due to dill's not configured.

eisenhauer commented 3 months ago

So, DILL_MULTI_TARGET isn't the right approach here. We should be able to build without DILL, but heterogeneity isn't what is used to be, so that might be broken. Let me check. In the meantime, what do you mean by "vendor dill"? The dill used in the ADIOS context is a research software package unlikely to be installed by any vendor.

felixonmars commented 3 months ago

That's a term used by Linux distributions for including another piece of software into the same repository and ship together. Sorry for the confusion.

eisenhauer commented 3 months ago

OK, thanks. I'm dummying-up the situation here so I can get address this matter. I'll see if there's a workaround, but I suspect there will have to be some Cmake changes to get things working. On the positive side, ADIOS doesn't absolutely need dill. It's used by FFS and EVPath, but only to support features that aren't used by ADIOS. So a solution is possible, it just might to take some CMake juggling.

felixonmars commented 3 months ago

I see. Thanks for looking into this!

eisenhauer commented 3 months ago

Can you please try running CMake with " -DDILL_NATIVE_ONLY=OFF ". You might have to clear out your build directory for this to be effective. There some adjustments that need to be made in the Dill CMake configuration, but I think this is a workaround for now.

felixonmars commented 3 months ago

Indeed it seems to work! Thanks :)

eisenhauer commented 3 months ago

Closing this as it has been fixed in dill and the patch has been included in downstream ADIOS, both master and release_210 branches. It should now default to -DDILL_NATIVE_ONLY=OFF when building on unsupported architectures.