Re: Building PosgresSQL with LLVM fails on Solaris 11.4

From: Andres Freund <andres(at)anarazel(dot)de>
To: Sacha Hottinger <itdo(at)cndag(dot)onmicrosoft(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Building PosgresSQL with LLVM fails on Solaris 11.4
Date: 2023-12-07 16:50:26
Message-ID: 20231207165026.emkbo6qj7y5vac2z@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2023-12-07 13:43:55 +0000, Sacha Hottinger wrote:
> 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

I don't know where the -KPIC is coming from. And TBH, I don't see much point
trying to fix a scenario involving matching sun studio C with g++.

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

I don't see a failure with gcc.

The warnings are emitted for every extension and compilation succeeds.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-12-07 17:05:13 Re: Remove MSVC scripts from the tree
Previous Message Andrew Dunstan 2023-12-07 16:38:47 Re: Make COPY format extendable: Extract COPY TO format implementations