Bug 253738 - editors/libreoffice: fix build
Summary: editors/libreoffice: fix build
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: FreeBSD Office Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-21 08:14 UTC by Alexander Mishin
Modified: 2021-06-20 14:31 UTC (History)
2 users (show)

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


Attachments
patch-sourceprovider-parser.y (297 bytes, patch)
2021-02-21 08:14 UTC, Alexander Mishin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Mishin 2021-02-21 08:14:24 UTC
Created attachment 222695 [details]
patch-sourceprovider-parser.y

A editor/libreoffice port fails to build (after latest update of a devel/bison port as I think)

[LEX] unoidl/source/sourceprovider-scanner
S=/usr/ports/editors/libreoffice/work/libreoffice-7.1.0.3 && I=$S/instdir && W=$S/workdir &&  mkdir -p $W/LexTarget/unoidl/source/ && /usr/local/bin/flex   -o$W/LexTarget/unoidl/source/sourceprovider-scanner.cxx $S/unoidl/source/sourceprovider-scanner.l && touch $W/LexTarget/unoidl/source/sourceprovider-scanner.done 
/usr/ports/editors/libreoffice/work/libreoffice-7.1.0.3/unoidl/source/sourceprovider-parser.y:13.1-12: [CXX] codemaker/source/commoncpp/commoncpp.cxx
warning: deprecated directive: ‘%pure-parser’, use ‘%define api.pure’ [

Needs to reset to restore terminal after that message.
All is ok after I made the proposed change to `sourceprovider-parser.y` by hand.
I made a quick patch to 'files/' folder of the port.
Comment 1 Li-Wen Hsu freebsd_committer 2021-02-22 08:31:56 UTC
I've successfully built editors/libreoffice with bison-3.7.5,1. Can you update your ports tree and check again? Thanks!
Comment 2 Alexander Mishin 2021-02-22 11:17:27 UTC
(In reply to Li-Wen Hsu from comment #1)

# uname -a
FreeBSD xxxxx 13.0-STABLE FreeBSD 13.0-STABLE #39 stable/13-n244573-bef16fad3bd2: Fri Feb 19 14:39:15 +04 2021     root@xxxxx:/usr/obj/usr/src/amd64.amd64/sys/XXXXX  amd64

This particular version of python (I had uninstall it and let to be installed it with a building a libreoffice automatically.):

But I got the same output on the first step right after the set of directories has been created.

===>   Registering installation for bison-3.7.5,1 as automatic
Installing bison-3.7.5,1...
===>   libreoffice-7.1.0.3_2 depends on executable: bison - found
===>   Returning to build of libreoffice-7.1.0.3_2

.................................... skipped

mkdir -p /usr/ports/editors/libreoffice/work/libreoffice-7.1.0.3/instdir/sdk/bin/
mkdir -p /usr/ports/editors/libreoffice/work/libreoffice-7.1.0.3/workdir/LinkTarget/Executable/
[YAC] unoidl/source/sourceprovider-parser
S=/usr/ports/editors/libreoffice/work/libreoffice-7.1.0.3 && I=$S/instdir && W=$S/workdir &&  mkdir -p $W/YaccTarget/unoidl/source/ && /usr/local/bin/bison   -v --defines=$W/YaccTarget/unoidl/source/sourceprovider-parser.hxx -o $W/YaccTarget/unoidl/source/sourceprovider-parser.cxx $S/unoidl/source/sourceprovider-parser.y && touch $W/YaccTarget/unoidl/source/sourceprovider-parser.done 
S=/usr/ports/editors/libreoffice/work/libreoffice-7.1.0.3 && I=$S/instdir && W=$S/workdir &&  touch $W/Headers/StaticLibrary/libcodemaker_cpp.a
S=/usr/ports/editors/libreoffice/work/libreoffice-7.1.0.3 && I=$S/instdir && W=$S/workdir &&  touch $W/Headers/StaticLibrary/libcodemaker.a
[LEX] unoidl/source/sourceprovider-scanner
S=/usr/ports/editors/libreoffice/work/libreoffice-7.1.0.3 && I=$S/instdir && W=$S/workdir &&  mkdir -p $W/LexTarget/unoidl/source/ && /usr/local/bin/flex   -o$W/LexTarget/unoidl/source/sourceprovider-scanner.cxx $S/unoidl/source/sourceprovider-scanner.l && touch $W/LexTarget/unoidl/source/sourceprovider-scanner.done 
/usr/ports/editors/libreoffice/work/libreoffice-7.1.0.3/unoidl/source/sourceprovider-parser.y:13.1-12: warning: deprecated directive: ‘%pure-parser’, use ‘%define api.pure’ [

/var/log/messages contains about it:
Feb 22 14:48:08 xxxxx pkg-static[99516]: bison-3.7.5,1 installed
Feb 22 14:49:02 xxxxx kernel: pid 3486 (bison), jid 0, uid 0: exited on signal 11

Thanks
Comment 3 Li-Wen Hsu freebsd_committer 2021-02-22 16:15:23 UTC
(In reply to mishin@mh.net.ru from comment #2)
> This particular version of python (I had uninstall it and let to be installed it with a building a libreoffice automatically.):

Do you mean python or bison?

Also, can you check:
- You have all other packages updated.
- Do you have any non-default build option selected/unselected in editors/libreoffice?
Comment 4 Alexander Mishin 2021-02-22 17:00:50 UTC
(In reply to Li-Wen Hsu from comment #3)

I meant "bison", of course, sorry.

All ports updated through "portsnap fetch update" and "portmaster -a". I have force to reinstall all packets the bison port depended on from a "make configure" list.

I deleted "/var/db/ports/editors_libreoffice/options" and run "portmaster libreoffice".

# diff -u options.b options 
--- options.b   2021-02-21 14:02:07.896668000 +0400
+++ options     2021-02-22 20:21:00.394208000 +0400
@@ -10,8 +10,8 @@
 OPTIONS_FILE_UNSET+=JAVA
 OPTIONS_FILE_UNSET+=KF5
 OPTIONS_FILE_SET+=MMEDIA
-OPTIONS_FILE_SET+=PGSQL
-OPTIONS_FILE_UNSET+=QT5
+OPTIONS_FILE_UNSET+=PGSQL
+OPTIONS_FILE_SET+=QT5
 OPTIONS_FILE_UNSET+=SDK
 OPTIONS_FILE_UNSET+=TEST
 OPTIONS_FILE_UNSET+=WEBDAV

But the result is the same again (output with warning, the need to reset the terminal, and bison exited on signal 11).

...and all builds ok if I write ‘%define api.pure’ instead of ‘%pure-parser’.
Comment 5 Li-Wen Hsu freebsd_committer 2021-02-22 17:19:41 UTC
(In reply to mishin@mh.net.ru from comment #4)
> FreeBSD xxxxx 13.0-STABLE FreeBSD 13.0-STABLE #39 stable/13-n244573-bef16fad3bd2: Fri Feb 19 14:39:15 +04 2021     root@xxxxx:/usr/obj/usr/src/amd64.amd64/sys/XXXXX  amd64

Maybe this is only in 13.x, I'll test this more.

In the mean time, do you think you can also send this patch to the upstream?
Comment 6 Dima Panov freebsd_committer 2021-02-23 03:13:14 UTC
Libreoffice builds fine on 13.0-BETA3 with clean environment in poudriere, also as in every previous snapshots.
https://build.dimapanov.com/poudriere/data/130amd64-dimaports/2021-02-21_00h14m06s/logs/libreoffice-7.1.0.3_2.log
https://build.dimapanov.com/poudriere/data/130amd64-dimaports/2021-02-21_11h35m28s/logs/libreoffice-7.1.0.3_2.log


As I can see, it's only a safe warning from bison, and something else caused failure. 
Please search loglile for 'Error 1', for example, or 'code dump'.

It looks like polluted/broken local environment nor LO buildsystem itself :(
Comment 7 Dima Panov freebsd_committer 2021-02-23 03:26:16 UTC
(In reply to mishin@mh.net.ru from comment #4)
BTW, did you test your machine with memtest?
Comment 8 Alexander Mishin 2021-02-23 12:57:00 UTC
(In reply to Dima Panov from comment #6)

Pasib.
Thanks. I'll reinstall all packages.
Comment 9 Alexander Mishin 2021-02-23 13:09:28 UTC
(In reply to Li-Wen Hsu from comment #5)

I have rebuilt the libreoffice port on another system "12.2-STABLE FreeBSD 12.2-STABLE r369252 amd64" twice - with "%pure-parser" and with "%define api.pure". Both times it was built ok.
I'll check Dima Panov's assumption and will reinstall all packages first.
Thanks.
Comment 10 Alexander Mishin 2021-02-25 11:32:20 UTC
(In reply to Dima Panov from comment #6)

https://tools.mh.net.ru/20210225/lldb_bison_sourceprovider-parser.log

Do I understand it right that the problem in /lib/libncursesw.so.9 (I have not enough skills to work with a debugger, sorry)?
Comment 11 Alexander Mishin 2021-02-28 10:50:06 UTC
I see that it is my problem only and I solved it already for myself. So I close the report. Thanks
Comment 12 Alexander Mishin 2021-03-12 19:52:01 UTC
Remaking the bison port without the NLS option helped.