[cfe-users] PostgreSQL 12 build issues on Solaris 11.4

Kamil Rytarowski via cfe-users cfe-users at lists.llvm.org
Mon Oct 7 11:16:04 PDT 2019


SunOS defines preprocessor symbols with register names that conflict
with the source code in LLVM.

One approach to handle this problem was upstreamed to LLVM. Another one
lives in pkgsrc and is maintained by Illumos community.

Personally, I am not a user of this OS so cannot help myself. I presume
that getting pkgsrc and interacting with the Illumos community, in case
of build issues, is the easiest approach.

On 07.10.2019 20:01, Jan Korous wrote:
> +CC Kamil who might know the answer.
> 
> Hi Eric,
> 
>> On Oct 7, 2019, at 12:49 AM, Dechaux Eric CEN (BCQ STIG) via cfe-users <cfe-users at lists.llvm.org> wrote:
>>
>> Hello,
>>
>> With the official llvm/clang release for Solaris 11.4 I tried to build PostgreSQL 12 with JIT enabled. JIT uses LLVM. However, the build fails with the following error :
>>
>> gmake[2] : on entre dans le répertoire « /tmp/build/pg12/postgresql-12.0/src/backend/jit/llvm »
>> g++ -Wall -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -march=native -mtune=native -std=c++11 -fno-rtti -fPIC -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -I/appli/stig/llvm/clang+llvm-9.0.0-amd64-pc-solaris2.11/include -I../../../../src/include  -I/usr/include/libxml2   -c -o llvmjit_inline.o llvmjit_inline.cpp
>> Dans le fichier inclus depuis /usr/include/sys/ucontext.h:14,
>>                  depuis /usr/include/sys/signal.h:197,
>>                  depuis /usr/include/sys/procset.h:17,
>>                  depuis /usr/include/sys/wait.h:22,
>>                  depuis /usr/include/stdlib.h:16,
>>                  depuis /usr/gcc/9/include/c++/9.1.0/cstdlib:75,
>>                  depuis /usr/gcc/9/include/c++/9.1.0/stdlib.h:36,
>>                  depuis ../../../../src/include/c.h:60,
>>                  depuis ../../../../src/include/postgres.h:46,
>>                  depuis llvmjit_inline.cpp:24:
>> /appli/stig/llvm/clang+llvm-9.0.0-amd64-pc-solaris2.11/include/llvm/IR/DebugInfoMetadata.h:493:45: erreur: expected « , » or « ... » before numeric constant
>>   493 |          Optional<ChecksumInfo<MDString *>> CS, Optional<MDString *> Src,
>>       |                                             ^~
>>
>> I have encountered this issue quite often on Solaris as CS is defined in a system header included by stdlib.h :
>>
>> $ gegrep '[[:space:]]CS[[:space:]]' /usr/include/sys/regset.h
>> #define CS              15
>>
>> I can see a new regset clean of this define is provided in include/llvm/Support/Solaris/sys/regset.h. How this header should be included ?
> 
> This header probably isn't intended to be included.
> 
> I't referred only in llvm/CMakeLists.txt:
>    # special hack for Solaris to handle crazy system sys/regset.h
>    include_directories("${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/Solaris")
> 
> And it's guarded by LLVM_SUPPORT_SOLARIS_SYS_REGSET_H.
> 
>>
>>
>> Thanks.
>>
>> -- Eric
>>
>>
>> Ce message �lectronique et tous les fichiers attach�s qu'il contient sont confidentiels et destin�s exclusivement � l'usage de la personne � laquelle ils sont adress�s. Si vous avez re�u ce message par erreur, merci de le retourner � son �metteur. La publication, l'usage, la distribution, l'impression ou la copie non autoris�e de ce message et des attachements qu'il contient sont strictement interdits.
>>
>> En cas d'urgence, composez le 17 ou le 112.
>> Afin de contribuer au respect de l'environnement, merci de n'imprimer cet e-mail qu'en cas de necessite.
>>
>> This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its associated attachments is strictly prohibited.
>>
>> In case of emergency, dial number 17 or 112.
>> To contribute to the environmental protection, please print this e-mail only if necessary. 
>> _______________________________________________
>> cfe-users mailing list
>> cfe-users at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20191007/aef55fb0/attachment.sig>


More information about the cfe-users mailing list