clang problem trying to build xpdf

OpenVMS x86 native compilers, cross compilers news and questions.
Post Reply
User avatar

Topic author
martinv
Master
Posts: 111
Joined: Fri Jun 14, 2019 11:05 pm
Reputation: 0
Location: Goslar, Germany
Status: Offline
Contact:

clang problem trying to build xpdf

Post by martinv » Fri May 24, 2024 6:20 am

Hi!

I thought I'd try to build my port of xpdf 3.02pl4 on x86_64, VMS V9.2-2 Update2. So I downloaded the source files, found and fixed a few bugs in the build process, and then, while building xpdf.exe:

Code: Select all

CXX -
 /FLOAT=IEEE /IEEE=UNDERFLOW -
 /EXTERN=STRICT -
 /WARN=(DISABLE=("c++11-compat-deprecated-writable-strings")) -
 /INCLUDE=([-],[-.GOO],[-.FOFI],[-.SPLASH]) -
 /repository=[-.cxx_repository] -
 XPDFTREE.CC -
 +[--.T1LIB-5_1_1]T1LIB/LIB -
 +[--.FREETYPE-2_3_4.BUILDS.VMS]FREETYPE/LIB -
 +[--.xpm-3_4k.lib]libxpm/lib
fatal error: error in backend: cannot have fixups in virtual section!
Stack dump:
0.      Program arguments: X86VMS$DKA0:[SYS0.SYSCOMMON.][SYSEXE]CXX$COMPILER.EXE \
         --std=gnu++98 \
         -I[-] -I[-.GOO] -I[-.FOFI] -I[-.SPLASH] \
         -Wno-c++11-compat-deprecated-writable-strings \
         -extern-model=strict_refdef \
         -Wno-nonportable-include-path \
         -x c++ \
         -D__RTTI \
         -text-library=SYS$SYSDEVICE:[BUILD.XPDF-V0302-4.T1LIB-5_1_1]T1LIB.TLB;2 \
         -text-library=SYS$SYSDEVICE:[BUILD.XPDF-V0302-4.FREETYPE-2_3_4.BUILDS.VMS]freetype.tlb;1 \
         -text-library=SYS$SYSDEVICE:[BUILD.XPDF-V0302-4.XPM-3_4K.LIB]LIBXPM.TLB;2 \
         SYS$SYSDEVICE:[BUILD.XPDF-V0302-4.XPDF-3_02.XPDF]XPDFTREE.CC;1
1.      <eof> parser at end of file
2.      Code generation
CXX$COMPILER: error: clang frontend command failed with exit code 70 (use -v to see invocation)
VSI C++ A10.1-240307
clang version 10.0.1 (git@bitbucket.org:vms_software/llvm-10.0.1.git e5ace0307c0a3989b3f39e8508b010fe5504e40f)
Build date: 03-07-2024
Target: x86_64-OpenVMS
Thread model: posix
InstalledDir: X86VMS$DKA0:[SYS0.SYSCOMMON.][SYSEXE]
CXX$COMPILER: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
LLVM ERROR: out of memory
%SYSTEM-F-ACCVIO, access violation, reason mask=04, virtual address=0000000000000011, PC=FFFF8300081FC9BE, PS=0000001B

  Improperly handled condition, image exit forced.
    Signal arguments:   Number = 0000000000000005
                        Name   = 000000000000000C
                                 0000000000000004
                                 0000000000000011
                                 FFFF8300081FC9BE
                                 000000000000001B
    Register dump:
    RAX = 0000000000000001  RDI = 000000007FF7BC20  RSI = 0000000000000001
    RDX = 0000000000000000  RCX = FFFFFFFF8AC05FDE  R8  = 0000000000000000
    R9  = FFFFFFFF8049B900  RBX = 000000007ACC3F00  RBP = 000000007ACBAB60
    R10 = FFFFFFFFFFFFFFD9  R11 = 0000000000000000  R12 = 000000007ACBAAA8
    R13 = FFFFFFFF804B83F0  R14 = FFFFFFFF804B8558  R15 = 000000007ACB4602
    RIP = FFFF8300081FC9BE  RSP = 000000007ACBAAA0  SS  = 000000000000001B
Any ideas how to to get closer to the source line triggering this?

I found some reference to the error message ("error in backend: cannot have fixups in virtual section") that points to an incorrect initializer.

TIA,
Martin

P.S.: As instructed, I generated the preprocessed source.
Attachments
XPDFTREE.s.zip
(24.14 KiB) Downloaded 22 times
Last edited by martinv on Fri May 24, 2024 6:34 am, edited 2 times in total.
What's the new buzzword to make on-premises sound cool again? "Cloudless"!


joukj
Master
Posts: 190
Joined: Thu Aug 27, 2020 5:50 am
Reputation: 0
Status: Offline

Re: clang problem trying to build xpdf

Post by joukj » Fri May 24, 2024 7:11 am

Since clang/C++ on X86 is not (yet) capable of interacting with DecWindows, I would not try to port Xpdf (yet).

However if you are only interested in the commandline tools you could also have a look at Poppler. I did build that succesfully on X86. See:
http://galop.nano.tudelft.nl/openvms/so ... ml#POPPLER

Jouk


jreagan
VSI Expert
Master
Posts: 154
Joined: Tue Dec 01, 2020 8:40 am
Reputation: 0
Status: Offline

Re: clang problem trying to build xpdf

Post by jreagan » Wed Jun 05, 2024 12:42 pm

The headers won't work right with "long" sizes confusion, but I don't expect an LLVM error like that. I'd expect it all to compile but not run correctly. I would like to know more.

Post Reply