Bug 251417 - [editors/openoffice-4 and editors/openoffice-devel]: fix build on powerpc64 (Current)
Summary: [editors/openoffice-4 and editors/openoffice-devel]: fix build on powerpc64 (...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Some People
Assignee: FreeBSD Office Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-27 00:11 UTC by Curtis Hamilton
Modified: 2024-11-05 00:08 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (office)


Attachments
Patch to fix OpenOffice-4 build (45.30 KB, patch)
2024-09-25 15:03 UTC, Curtis Hamilton
no flags Details | Diff
Patch to fix OpenOffice-devel build (41.65 KB, patch)
2024-09-25 15:03 UTC, Curtis Hamilton
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Hamilton 2020-11-27 00:11:24 UTC
Attempts to build openoffice-4 and openoffice-devel on PowerPC64 (Current), using gcc, results in the below:


=============
Building module instsetoo_native
=============

Entering /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/inc_openoffice/windows/msi_languages


Entering /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/inc_openoffice/unix

mkout -- version: 1.8
mkout -- version: 1.8

Entering /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/util

cp -f /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdppc64.pro/pck/intro.zip ../unxfbsdppc64.pro/bin/intro.zip
cp -f /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdppc64.pro/pck/openoffice_dev/intro.zip ../unxfbsdppc64.pro/bin/dev/intro.zip
cp -f /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdppc64.pro/bin/images.zip ../unxfbsdppc64.pro/bin/dev/images.zip
/usr/local/bin/perl /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solenv/bin/replace_in_zip.pl	\
		../unxfbsdppc64.pro/bin/dev/images.zip				\
		framework/res/			\
		/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/default_images/framework/res/dev/	\
		backing.png			\
		backing_hc.png			\
		backing_rtl_left.png		\
		backing_rtl_left_hc.png
cp -f /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdppc64.pro/lib/pyuno/uno.py ../unxfbsdppc64.pro/bin/uno.py
cp -f /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdppc64.pro/lib/pyuno/unohelper.py ../unxfbsdppc64.pro/bin/unohelper.py
cp -f /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdppc64.pro/lib/pyuno/pythonloader.py ../unxfbsdppc64.pro/bin/pythonloader.py
mkdir: ../unxfbsdppc64.pro/bin/dev/: File exists
cp -f /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdppc64.pro/lib/pyuno/pythonscript.py ../unxfbsdppc64.pro/bin/pythonscript.py
cp -f /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdppc64.pro/lib/pyuno/officehelper.py ../unxfbsdppc64.pro/bin/officehelper.py
cp -f /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdppc64.pro/lib/pyuno/mailmerge.py ../unxfbsdppc64.pro/bin/mailmerge.py
replacing backing.png
replacing backing_hc.png
replacing backing_rtl_left.png
replacing backing_rtl_left_hc.png
writing archive back to disk
... checking environment variables ...

########################################################
make_installer.pl, version 1.0
Product list file: ../util/openoffice.lst
Taking setup script from solver
Unpackpath: /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/util/../unxfbsdppc64.pro
Compiler: unxfbsdppc64
Product: Apache_OpenOffice
BuildID: 9822
Build: AOO420
No minor set
Product version
Using default installpath
Package format: archive
msi templatepath: /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/util/../unxfbsdppc64.pro/misc/openoffice/msi_templates
msi template path will be ignored for non Windows builds!
msi languagepath: /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/util/../unxfbsdppc64.pro/misc/win_ulffiles
msi language path will be ignored for non Windows builds!
Calling epm
Stripping files
Unzip ARCHIVE files
Languages: en-US
########################################################
... checking required files ...
...... searching zip ...
	Found: /usr/local/bin/zip
... analyzing ../util/openoffice.lst ... 
... reading include paths ...
... analyzing script: /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdppc64.pro/bin/setup_osl.ins ... 
... analyzing script: /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdppc64.pro/bin/setup_osl.ins ... 
... analyzing directories ... 
... analyzing files ... 
... analyzing scpactions ... 
... analyzing shortcuts ... 
... analyzing unix links ... 
... analyzing profile ... 
... analyzing profileitems ... 
... analyzing modules ... 
------------------------------------
... languages en-US ... 
... analyzing files ...
preparing 0 extension blobs for language en-US:
preparing 0 bundled extensions for language en-US:
... analyzing files with flag ARCHIVE ...
... analyzing files with flag SUBST_FILENAME ...
... analyzing files with flag SCPZIP_REPLACE ...
... analyzing files with flag PATCH_SO_NAME ...
... analyzing files with flag HIDDEN ...
... analyzing all directories for this product ...
... analyzing links ...
... analyzing unix links ...
... creating profiles ...
fatal: not a git repository (or any of the parent directories): .git
... analyzing modules ...
... creating installation directory ...
... creating installation set in /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/unxfbsdppc64.pro/Apache_OpenOffice/archive/install/en-US ...
... removing old installation directories ...
... creating directories ...
... copying files ...
... creating links ...
remove_empty_dirs_in_folder /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/unxfbsdppc64.pro/Apache_OpenOffice/archive/install/en-US_inprogress/Apache_OpenOffice_4.2.0_FreeBSD_install-arc_en-US/openoffice4/share/extensions
... current dir: /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/unxfbsdppc64.pro/Apache_OpenOffice/archive/install/en-US_inprogress/Apache_OpenOffice_4.2.0_FreeBSD_install-arc_en-US/openoffice4/program ...
... /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/unxfbsdppc64.pro/Apache_OpenOffice/archive/install/en-US_inprogress/Apache_OpenOffice_4.2.0_FreeBSD_install-arc_en-US/openoffice4/program/unopkg sync --verbose -env:UNO_JAVA_JFW_ENV_JREHOME=true 2>&1 | ...

**************************************************
ERROR: ERROR: /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/unxfbsdppc64.pro/Apache_OpenOffice/archive/install/en-US_inprogress/Apache_OpenOffice_4.2.0_FreeBSD_install-arc_en-US/openoffice4/program/unopkg sync --verbose -env:UNO_JAVA_JFW_ENV_JREHOME=true 2>&1 | failed!
in function: register_extensions
**************************************************
... cleaning the output tree ...
... removing directory /tmp/ooopackaging/i_557201606434023 ...
... removing directory /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/unxfbsdppc64.pro/Apache_OpenOffice/archive/stripped/en-US ...
Error: ERROR: /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/unxfbsdppc64.pro/Apache_OpenOffice/archive/install/en-US_inprogress/Apache_OpenOffice_4.2.0_FreeBSD_install-arc_en-US/openoffice4/program/unopkg sync --verbose -env:UNO_JAVA_JFW_ENV_JREHOME=true 2>&1 | failed!
in function: register_extensionsstopping log at Thu Nov 26 18:53:42 2020
dmake:  Error code 255, while making 'openoffice_en-US.archive'

1 module(s): 
	instsetoo_native
need(s) to be rebuilt

Reason(s):

ERROR: error 65280 occurred while making /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/util

When you have fixed the errors in that module you can resume the build by running:

	build --from instsetoo_native

*** Error code 1

Stop.
make[1]: stopped in /usr/ports/editors/openoffice-devel
*** Error code 1

Stop.
make: stopped in /usr/ports/editors/openoffice-devel
Comment 1 Don Lewis freebsd_committer freebsd_triage 2020-11-28 01:44:11 UTC
The error appears to be here:
... /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/unxfbsdppc64.pro/Apache_OpenOffice/archive/install/en-US_inprogress/Apache_OpenOffice_4.2.0_FreeBSD_install-arc_en-US/openoffice4/program/unopkg sync --verbose -env:UNO_JAVA_JFW_ENV_JREHOME=true 2>&1 | ...

**************************************************
ERROR: ERROR: /usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/instsetoo_native/unxfbsdppc64.pro/Apache_OpenOffice/archive/install/en-US_inprogress/Apache_OpenOffice_4.2.0_FreeBSD_install-arc_en-US/openoffice4/program/unopkg sync --verbose -env:UNO_JAVA_JFW_ENV_JREHOME=true 2>&1 | failed!
in function: register_extensions
**************************************************

I will investigate further.
Comment 2 Don Lewis freebsd_committer freebsd_triage 2020-11-28 06:51:53 UTC
Any non-default build options or anything interesting in /etc/make.conf?
Comment 3 Curtis Hamilton 2020-11-29 01:14:23 UTC
(In reply to Don Lewis from comment #2)
There's nothing unusual in my make.conf.

After a bit of digging, it seems that this issue is related to the bridges.  unopkg.bin sigfaults upon execution. Below is what I get from gdb.

GNU gdb (GDB) 8.3.1 [GDB v8.3.1 for FreeBSD]
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "powerpc64-portbld-freebsd13.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./unopkg.bin...
(No debugging symbols found in ./unopkg.bin)
(gdb) run
Starting program: /usr/ports/editors/openoffice-4/work/aoo-4.1.7/main/instsetoo_native/unxfbsdp.pro/Apache_OpenOffice/archive/install/en-US_witherror/Apache_OpenOffice_4.1.7_FreeBSD_install-arc_en-US/openoffice4/program/unopkg.bin 

Program received signal SIGSEGV, Segmentation fault.
0x0000000811bc6a18 in vtable for __cxxabiv1::__si_class_type_info () from /lib/libcxxrt.so.1
(gdb) 

It seems the bridges for powerpc64 needs to be adjusted to work inconjunction with clang, even when building with gcc.
Comment 4 Don Lewis freebsd_committer freebsd_triage 2020-11-29 06:00:51 UTC
FYI, the MacOS port (I don't know the arch) works.  I think the FreeBSD port has a separate copy of the bridges code.
Comment 5 Curtis Hamilton 2020-11-29 23:11:29 UTC
(In reply to Don Lewis from comment #4)
Yes, but I don't believe clang is supported on MacOS PowerPC.  

My point is there seems to be a gcc/clang conflict in the code of the bridges on FreeBSD PowerPC64.  This is indicated by gdb, when compiling with gcc, it should not reference the clang runtime library.

The bridges work perfectly on freebsd 12.x.  It's only on Current (13) that things  break, as that's when the default C/C++ switches to clang.
Comment 6 Don Lewis freebsd_committer freebsd_triage 2020-11-30 07:11:03 UTC
I suspect that the configure logic needs to be adjusted for this combo.  How are you trying to get the build to use gcc on 13-CURRENT?
Comment 7 Curtis Hamilton 2020-11-30 14:54:33 UTC
(In reply to Don Lewis from comment #6)
I’ve tried setting gcc in ‘etc/make.conf’ and in the Makefile with “USE_GCC = YES”. Getting the same results.
Comment 8 Don Lewis freebsd_committer freebsd_triage 2020-11-30 18:55:47 UTC
Something to be wary of is if any LIB_DEPENDS use clang for C++ compilation while the port uses gcc (or vice-versa), bad things tend to happen.  I don't know if that is the problem here.
Comment 9 Graham Perrin freebsd_committer freebsd_triage 2023-01-22 21:16:05 UTC
<https://cgit.freebsd.org/ports/commit/?id=c41bce980e44454f64e9b8e313941f9b56e5ce14> 

> editors/openoffice-4: mark BROKEN

> BROKEN=		does not build: invalid use of @return
Comment 10 Curtis Hamilton 2024-09-25 15:03:07 UTC
Created attachment 253812 [details]
Patch to fix OpenOffice-4 build
Comment 11 Curtis Hamilton 2024-09-25 15:03:42 UTC
Created attachment 253813 [details]
Patch to fix OpenOffice-devel build
Comment 12 Curtis Hamilton 2024-09-25 15:04:30 UTC
Patches to fix issues with build on powerpc64.
Comment 13 Don Lewis freebsd_committer freebsd_triage 2024-11-03 23:00:49 UTC
Please see this upstream pull request: https://github.com/apache/openoffice/pull/225
Comment 14 commit-hook freebsd_committer freebsd_triage 2024-11-04 12:00:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d74f1e0a8d38d54eae26f2494ef077eb05c653fb

commit d74f1e0a8d38d54eae26f2494ef077eb05c653fb
Author:     Curtis Hamilton <hamiltcl@verizon.net>
AuthorDate: 2024-11-04 11:50:28 +0000
Commit:     Don Lewis <truckman@FreeBSD.org>
CommitDate: 2024-11-04 11:59:06 +0000

    editors/openoffice-*: Fix build on powerpc64

    The upstream bridges code does not yet work on powerpc64.

    PR:             251417

 .../files/patch-bridges_prj_build.lst (new)        |  12 +
 ..._cpp__uno_gcc3__freebsd__powerpc64_call.s (new) | 482 +++++++++++++++++++++
 ..._uno_gcc3__freebsd__powerpc64_cpp2uno.cxx (new) | 257 +++++++++++
 ..._uno_gcc3__freebsd__powerpc64_makefile.mk (new) |  21 +
 ...rce_cpp__uno_gcc3__freebsd__powerpc64_share.hxx |  78 +++-
 ...e_cpp__uno_gcc3__freebsd__powerpc64_uno2cpp.cxx | 381 +++++++++++++++-
 .../openoffice-4/files/patch-set_soenv.in (new)    |  67 +++
 .../files/patch-solenv_inc_unxfbsdp.mk (new)       |  34 ++
 ...esttools__source__bridgetest__makefile.mk (new) |  12 +
 .../files/patch-bridges_Library__cpp__uno.mk (new) |  14 +
 ..._cpp__uno_gcc3__freebsd__powerpc64_call.s (new) | 482 +++++++++++++++++++++
 ..._uno_gcc3__freebsd__powerpc64_cpp2uno.cxx (new) | 257 +++++++++++
 ..._uno_gcc3__freebsd__powerpc64_makefile.mk (new) |  21 +
 ...rce_cpp__uno_gcc3__freebsd__powerpc64_share.hxx |  78 +++-
 ...e_cpp__uno_gcc3__freebsd__powerpc64_uno2cpp.cxx | 381 +++++++++++++++-
 .../files/patch-solenv_inc_unxfbsdp.mk (new)       |  34 ++
 ...esttools__source__bridgetest__makefile.mk (new) |  12 +
 17 files changed, 2601 insertions(+), 22 deletions(-)
Comment 15 commit-hook freebsd_committer freebsd_triage 2024-11-05 00:08:02 UTC
A commit in branch 2024Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1fa626a715ffccf17bd70209baff44ae795e1ba7

commit 1fa626a715ffccf17bd70209baff44ae795e1ba7
Author:     Curtis Hamilton <hamiltcl@verizon.net>
AuthorDate: 2024-11-04 11:50:28 +0000
Commit:     Don Lewis <truckman@FreeBSD.org>
CommitDate: 2024-11-05 00:07:13 +0000

    editors/openoffice-*: Fix build on powerpc64

    The upstream bridges code does not yet work on powerpc64.

    PR:             251417
    (cherry picked from commit d74f1e0a8d38d54eae26f2494ef077eb05c653fb)

 .../files/patch-bridges_prj_build.lst (new)        |  12 +
 ..._cpp__uno_gcc3__freebsd__powerpc64_call.s (new) | 482 +++++++++++++++++++++
 ..._uno_gcc3__freebsd__powerpc64_cpp2uno.cxx (new) | 257 +++++++++++
 ..._uno_gcc3__freebsd__powerpc64_makefile.mk (new) |  21 +
 ...rce_cpp__uno_gcc3__freebsd__powerpc64_share.hxx |  78 +++-
 ...e_cpp__uno_gcc3__freebsd__powerpc64_uno2cpp.cxx | 381 +++++++++++++++-
 .../openoffice-4/files/patch-set_soenv.in (new)    |  67 +++
 .../files/patch-solenv_inc_unxfbsdp.mk (new)       |  34 ++
 ...esttools__source__bridgetest__makefile.mk (new) |  12 +
 .../files/patch-bridges_Library__cpp__uno.mk (new) |  14 +
 ..._cpp__uno_gcc3__freebsd__powerpc64_call.s (new) | 482 +++++++++++++++++++++
 ..._uno_gcc3__freebsd__powerpc64_cpp2uno.cxx (new) | 257 +++++++++++
 ..._uno_gcc3__freebsd__powerpc64_makefile.mk (new) |  21 +
 ...rce_cpp__uno_gcc3__freebsd__powerpc64_share.hxx |  78 +++-
 ...e_cpp__uno_gcc3__freebsd__powerpc64_uno2cpp.cxx | 381 +++++++++++++++-
 .../files/patch-solenv_inc_unxfbsdp.mk (new)       |  34 ++
 ...esttools__source__bridgetest__makefile.mk (new) |  12 +
 17 files changed, 2601 insertions(+), 22 deletions(-)