1

I just compiled my own version of gcc/9.2.0 using gcc/4.8.2. After successful compilation and installation of gcc/9.2.0 I try compiling ucx-1.5.1. When I try to run the ucx configure script I get the following message "checking attribute((constructor))... configure: error: Cannot continue. Please use compiler that supports attribute((constructor))". When I run the script using the old gcc/4.8.2 I get no error at all.

Any idea what went wrong?

rici
  • 234,347
  • 28
  • 237
  • 341
L.H
  • 33
  • 2
  • Is it possible that the gcc/9.2.0 does not support "__attribute__((constructor))" ? – L.H Jan 28 '20 at 18:18

3 Answers3

0

Any idea what went wrong? No.

You can have a look at the respective config.log file, it usually contains additional information. In general, not every compilation error during configue indicates a problem, it's usually just feature test that just revealed a specific feature is not available.

emacs drives me nuts
  • 2,785
  • 13
  • 23
0

Ucx uses next code to determine support of attribute __attribute__((constructor)). You can test it by yourself:

gcc -x c - <<EOF 
static int rc = 1;
static void constructor_test() __attribute__((constructor));
static void constructor_test() { rc = 0; }
int main() { return rc; }
EOF

And post here if you have some errors.

prudenko
  • 1,663
  • 13
  • 19
0

I had the same problem, because I installed a software named "binutils-devel" on CentOS 8.4.

When "binutils-devel" was removed, the compile of ucx was successful.

Henry Ecker
  • 34,399
  • 18
  • 41
  • 57