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?

1
  • Is it possible that the gcc/9.2.0 does not support "__attribute__((constructor))" ?
    – L.H
    Jan 28, 2020 at 18:18

3 Answers 3

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.

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.

0
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.