AW: Building PosgresSQL with LLVM fails on Solaris 11.4

From: Sacha Hottinger <itdo(at)cndag(dot)onmicrosoft(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: AW: Building PosgresSQL with LLVM fails on Solaris 11.4
Date: 2023-12-07 13:43:55
Message-ID: AM5PR04MB30730DFB8E9A8551DF64E539BB8BA@AM5PR04MB3073.eurprd04.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Andres

Thanks a lot.
It now got much further but failed here with Sun Studio:

gmake[2]: Leaving directory '/opt/cnd/opt28-2_13.3_gmake_all_llvm_fixV2/src/test/perl'
gmake -C backend/jit/llvm all
gmake[2]: Entering directory '/opt/cnd/opt28-2_13.3_gmake_all_llvm_fixV2/src/backend/jit/llvm'
/opt/developerstudio12.6/bin/cc -m64 -xarch=native -Xa -v -O -KPIC -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -I/usr/include -I../../../../src/include -c -o llvmjit.o llvmjit.c
"llvmjit.c", line 493: warning: argument #1 is incompatible with prototype:
prototype: pointer to void : "../../../../src/include/jit/llvmjit_emit.h", line 27
argument : pointer to function(pointer to struct FunctionCallInfoBaseData {pointer to struct FmgrInfo {..} flinfo, pointer to struct Node {..} context, pointer to struct Node {..} resultinfo, unsigned int fncollation, _Bool isnull, short nargs, array[-1] of struct NullableDatum {..} args}) returning unsigned long
g++ -O -std=c++14 -KPIC -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -I/usr/include -I../../../../src/include -c -o llvmjit_error.o llvmjit_error.cpp
g++: error: unrecognized command-line option ‘-KPIC’; did you mean ‘-fPIC’?
gmake[2]: *** [<builtin>: llvmjit_error.o] Error 1
gmake[2]: Leaving directory '/opt/cnd/opt28-2_13.3_gmake_all_llvm_fixV2/src/backend/jit/llvm'
gmake[1]: *** [Makefile:42: all-backend/jit/llvm-recurse] Error 2
gmake[1]: Leaving directory '/opt/cnd/opt28-2_13.3_gmake_all_llvm_fixV2/src'
gmake: *** [GNUmakefile:11: all-src-recurse] Error 2

With ggc it fails at the same step as before.
I have attached the log files of the SunStudio and gcc runs to the email.

Many thanks for your help.

Best regards
Sacha

Von: Andres Freund <andres(at)anarazel(dot)de>
Datum: Mittwoch, 6. Dezember 2023 um 19:01
An: Sacha Hottinger <itdo(at)cndag(dot)onmicrosoft(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org <pgsql-hackers(at)postgresql(dot)org>
Betreff: Re: Building PosgresSQL with LLVM fails on Solaris 11.4
Hi,

On 2023-12-01 23:06:59 +0000, Sacha Hottinger wrote:
> // I used the patch command to patch the src/backend/port/Makefile with your attached file and tried again with the Sun Studio compiler. There is now a different error at this stage:
> …
> /opt/developerstudio12.6/bin/cc -m64 -xarch=native -Xa -v -O -I../../../src/include -c -o pg_shmem.o pg_shmem.c
> echo | /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2 -I../../../src/include -flto=thin -emit-llvm -c -xc -o tas.bc tas.s
> tas.s:1:1: error: expected identifier or '('
> !-------------------------------------------------------------------------
> ^
> 1 error generated.

That's me making a silly mistake... I've attached at an updated, but still
blindly written, diff.

> // Have attached the config.log, gmake all full log, and patched Makefile.

Could you attach config.log and gmake for the gcc based build? Because so far
I have no idea what causes the linker issue there.

Greetings,

Andres Freund

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager.

Attachment Content-Type Size
SunStudio_log.tar application/octet-stream 1020.0 KB
gcc_log.tar application/octet-stream 1.1 MB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2023-12-07 13:47:10 Re: Emitting JSON to file using COPY TO
Previous Message Daniel Verite 2023-12-07 13:35:52 Re: Emitting JSON to file using COPY TO