Do you want to request a feature or report a bug?
FR
What is the current behavior?
Too many linuxisms is the scripts + compilation of unnecessary components which are already available via the ports system
What is the expected behavior?
Autodetection of the BSD platform and compilation of core
I'm willing to do some work on this. @oparoz (or anyone else for that matter) have you put much time into getting this to build?
I personally only care about the server side, but getting the client to build would be awesome too.
That would be great @beatgammit !
I did not put any effort. I just looked at the build scripts and saw that this was not ready at all for the BSD platform.
Some news on this ?
Has there been any movement on this, everyone over at FreeNAS would be really happy.
@ideal2545 Sorry, currently this is not a high priority task, so no any major progress
I haven't had time to dig in, and I'll be using LibreOffice in the short term, so I'm likely not going to look at it anytime soon. I'm still interested though.
I spent many hours trying to only compile the DocumentServer part of OnlyOffice.
It was nearly a success before I discovered that it needs some node.js packages which are obsolete, unmaintained and thus unavailable for FreeBSD. Before that I had to update tens and tens of source code files, Makefiles etc. in order to get it compiling. This work is really boring and can't be finished until OnlyOffice uses still maintained external packages.
I would very happy to try to get it fully compiling and working natively and to send patches if one of the author accepts to integrate this work..
@Teetoow Hi, you can create PR with patches and if our dev team will approved them we'll merge them
@ShockwaveNN then I'll try to find some time to do the job as soon as possible.
I just expect that the latest document server stopped the use of the umaintained node.js packages. Otherwise i won't be able to get it working because of that.
@Teetoow Could you provide list of unmaintained packages or a way to know it?
@ShockwaveNN I'll try to find it again. I was doing this work the last summer.. I didn't had time to continue the work.. In all cases I will retry the next summer (I won't have time before!)
@ShockwaveNN I had trouble with PhantomJS (https://github.com/ariya/phantomjs/issues/15344)
@Teetoow As far as I remember PhantomJS used only in testing
@Teetoow Also, latest commit in PhantomJS is 16 days ago, seems project is not unmaintained. Also I'm not sure how unmaintained nodejs project related with compilation on FreeBSD
Does anybody have a full list of dependencies? It would be a good first step in order to determine what's actually needed.
@tuxillo You can look at Dockerfile to determine that
@Teetoow Also, latest commit in PhantomJS is 16 days ago, seems project is not unmaintained. Also I'm not sure how unmaintained nodejs project related with compilation on FreeBSD
Ok so I tried to take some times to update my initial patch to the latest onlyoffice release. The core directory compiles without any trouble (I'll send the patch once everything will work).
Unfortunately I still have troubles with web-apps nodeJS modules: "grunt-mocha" requires phantomJS v 2.1.16. Unfortunately this release is not available in the npm repository for FreeBSD and I can't compile it since this version is not available in the phantomJS github (https://github.com/Medium/phantomjs/releases/). That's why it doesn't work.
Since I don't really understand whether these packages are really needed for production or are needed for testing, I don't know what to do.. Maybe you can give me some hints or a solution to skip that part if it's for testing only?
Has there been any movement on this, everyone over at FreeNAS would be really happy.
And everyone directly on FreeBSD :)
Since the document server has 6 components (according to the README in the project root) I wonder if it would not be easier to bring each of those components together one by one, meaning one port, at least, for each one.
Starting with core, the table below lists the common 3rd party software, although it will be outdated soon:
| 3rd party component | Version in core | Version in FreeBSD ports| Observations |
| ------------- | ------------- |------------- |------------- |
| boost | 1.58.0 | 1.72 | Statically linked? |
| cef | 3202 | Port required | No build, fetches a binary release |
| cryptopp | 7.0.0 | 8.2.0 | No build.sh, used later? |
| icu | 58.2 | 65.1 | No build, fetches a binary release |
| openssl | master | 1.1.1d | . |
| pole | n/a | Port or source required | No build.sh, used later? |
| v8 | 6.0 / 7.0 | 3.18.5 | . |
ok so all the documentserver compiles without any error with my Makefile, scripts and preprocessor modifications. The only trouble is that the v8 version of FreeBSD is too old (as @tuxillo mentioned) and compiling v8 under FreeBSD is just definitely too hard (first of all gclient/synth don't support FreeBSD)!
This is the last piece of the puzzle which is missing. If someone has an idea about how to compile recent version of v8 under FreeBSD I would be really interested in!
The only idea I've got is to try to use the V8 version which comes with nodejs (which compiles perfectly under FreeBSD) and try to generate a shared library from it..
@tuxillo in order to not destroy the onlyoffice architecture source I think the best thing to do is to use the third party components brought with DocumentServer (except for v8 which is too hard to compile... and ICU since they are linked).
@Teetoow if the goal is to just build DocumentServer in FreeBSD so that people can build themselves, then I guess it's okay just to use whatever comes with DS. However if the goal is to bring DS to freebsd ports, the process is going to need to be properly defined and split in parts to have a chance for it to be accepted.
@tuxillo I understand. For the moment my only goal is to get DocumentServer running natively on FreeBSD without having a virtual machine running for that purpose (I unfortunately don't have enough time and FreeBSD ports knowledges for something else).
But as I previously said this can only be achieved if a not-so-old v8 version can be compiled under FreeBSD.. As far as I understood and tried this is a VERY BIG deal.. (and managing an up-to-date v8 port for FreeBSD might be much harder than one for DocumentServer :s).
That's why if you have any ideas about how to achieve this goal I would be really interested in.
@Teetoow FreeBSD ports have 'www/chromium' which includes a v8 version:
> egrep -r -e 'V8_MAJOR_VERSION|V8_MINOR_VERSION' v8/include/v8-version.h
#define V8_MAJOR_VERSION 7
#define V8_MINOR_VERSION 9
Patches are:
https://github.com/freebsd/freebsd-ports/blob/master/www/chromium/files/patch-v8_BUILD.gn
https://github.com/freebsd/freebsd-ports/blob/master/www/chromium/files/patch-v8_src_api_api.cc
https://github.com/freebsd/freebsd-ports/blob/master/www/chromium/files/patch-v8_src_base_cpu.cc
https://github.com/freebsd/freebsd-ports/blob/master/www/chromium/files/patch-v8_src_base_platform_platform-posix.cc
https://github.com/freebsd/freebsd-ports/blob/master/www/chromium/files/patch-v8_src_trap-handler_handler-inside-posix.cc
https://github.com/freebsd/freebsd-ports/blob/master/www/chromium/files/patch-v8_src_trap-handler_handler-inside-posix.h
https://github.com/freebsd/freebsd-ports/blob/master/www/chromium/files/patch-v8_src_trap-handler_trap-handler.h
It requires other files within chromium, not sure how it is done in v8 itself directly.
HTH
Hi,
Just a little message in order to let you know that I found a nice solution for the libv8 under FreeBSD (thanks to Fedora ^^) and now DocumentServer is compiling well!
The only thing I had to remove is the dependance with grunt-mocha (but it seems that it's not used?!).
I'm trying to do some tests in order to check whether everything is working well. Then I'll submit to you the patch and a document which explains how to compile it under FreeBSD.
I hope you'll accept it.
Almost everything is working well. I just encounter a bug in the x2t binary which returns 80 each time I finish to edit a file. Thus modifications cannot be submitted to nextcloud and are lost in the DocumentServer part somewhere..
I still understand what causes that problem.. When I trace its execution it seems that it succeed to uncompress the file, parse its content and stop, clean everything and returns 80 (AVS_FILEUTILS_ERROR_CONVERT ?)
Please find attached to this post the OnlyOffice DocumentServer patchs, a text file which describes the compilation and configuration steps for FreeBSD users and a patch of the FreeBSD www/node8 port in order to get the needed libv8.
FreeBSD.txt
core.patch.txt
sdkjs.patch.txt
server.patch.txt
web-apps.patch.txt
node8.patch.txt
The bug cames from the function (in "common/File.cpp") which returns the current program path found from /proc/exe directory. This one does not exists under FreeBSD. Thus x2t was not able to find its configuration file.
The associated patch (which replaces the "core.patch.txt" of my previous post) solved the problem.
Now through these patchs it works perfectly under FreeBSD.
core.patch.txt
The bug cames from the function (in "common/File.cpp") which returns the current program path found from /proc/exe directory. This one does not exists under FreeBSD. Thus x2t was not able to find its configuration file.
The associated patch (which replaces the "core.patch.txt" of my previous post) solved the problem.
Now through these patchs it works perfectly under FreeBSD.
core.patch.txt
Would you release a tutorial on how to set it up alongside nextcloud with nginx? :) That would be awesome! I would love to get rid of the vm.
The bug cames from the function (in "common/File.cpp") which returns the current program path found from /proc/exe directory. This one does not exists under FreeBSD. Thus x2t was not able to find its configuration file.
The associated patch (which replaces the "core.patch.txt" of my previous post) solved the problem.
Now through these patchs it works perfectly under FreeBSD.
core.patch.txtWould you release a tutorial on how to set it up alongside nextcloud with nginx? :) That would be awesome! I would love to get rid of the vm.
I let you read the FreeBSD.txt file on my previous post which contains all the information in order to compile DocumentServer under FreeBSD, configure and use it with nginx :)
I also invite you to install it into a jail
Wow, it's great to read that the DocumentServer compiles under FreeBSD. Congratulations to all those who have worked on it.
Please allow me to ask whether anyone has tried to compile the DesktopEditors under FreeBSD and what are the issues. I would love to see them under FreeBSD as well.
Hi
Thank you for this great feat!
I've tried to compile it under freeNAS without success (would not install node8 without uninstalling the old version of node8, but after removing it, it wouldn't compile the new one)
Could it be possible to post the compiled binary?
Is the goal to finally get the support of FreeBSD seamless in the official app? When could this happen?
Wow, it's great to read that the DocumentServer compiles under FreeBSD. Congratulations to all those who have worked on it.
Please allow me to ask whether anyone has tried to compile the DesktopEditors under FreeBSD and what are the issues. I would love to see them under FreeBSD as well.
First of all, thanks to Teetoow's work.
The main issue blocking DesktopEditors to work is CEF, the Chromium Embedded Framework. You may look at www/chromium port, to check how it's complicated to make chromium work. Though I've seen somebody worked on an old version but have no time to try:
https://github.com/prash-wghats/Brackets-CEF-for-FreeBSD
Good luck.
Almost everything is working well. I just encounter a bug in the x2t binary which returns 80 each time I finish to edit a file. Thus modifications cannot be submitted to nextcloud and are lost in the DocumentServer part somewhere..
I still understand what causes that problem.. When I trace its execution it seems that it succeed to uncompress the file, parse its content and stop, clean everything and returns 80 (AVS_FILEUTILS_ERROR_CONVERT ?)
Please find attached to this post the OnlyOffice DocumentServer patchs, a text file which describes the compilation and configuration steps for FreeBSD users and a patch of the FreeBSD www/node8 port in order to get the needed libv8.
FreeBSD.txt
core.patch.txt
sdkjs.patch.txt
server.patch.txt
web-apps.patch.txt
node8.patch.txt
I've worked out another way for V8. This will help systems with node8/10/12 conflicts.
Just compile node8 from source, configure with --enable-static and set CFLAGS and CXXFLAGS to -fPIC, maybe --shared-openssl and --with-intl=system-icu as you like (to link against system and port dylib instead of embedded one).
After V8 compilation, put these files
libv8_base.a
libv8_libplatform.a
libv8_libsampler.a
libv8_libbase.a
libv8_snapshot.a
into dir core/Common/3dParty/v8/v8/out.gn/freebsd_64/obj/
and patch that pri
--- a/Common/3dParty/v8/v8.pri
+++ b/Common/3dParty/v8/v8.pri
@@ -29,6 +29,11 @@ core_linux {`
LIBS += -L$$CORE_V8_PATH_LIBS/third_party/icu -licui18n -licuuc
}
+core_freebsd {
+ LIBS += -L$$CORE_V8_PATH_LIBS -lv8_base -lv8_libplatform -lv8_libbase -lv8_snapshot -lv8_libsampler
+ LIBS += -L$$CORE_V8_PATH_LIBS/third_party/icu -licui18n -licuuc
+}
+
core_mac {
LIBS += -L$$CORE_V8_PATH_LIBS -lv8_base -lv8_libplatform -lv8_libbase -lv8_snapshot -lv8_libsampler
This will result a DocumentServer core with it's own v8, and as tried by me, runs fine under node10 :)
Thanks a lot for the effort @Teetoow and @meowthink!
DocumentServer has seemingly been updated to v 5.5.0 so some of the diff patches do not work anymore. As a consequence compilation fails.
Any help is appreciated.
wow, what a story, I'll have to give it a try asap :)
Anyway, thanks to @Teetoow and @meowthink for the successtory
@Teetoow & @meowthink
Good job . I'm expecting this on FreeBSD .
Any latest version for testing on FreeBSD 12.1 Release after the latest "core.patch.txt" ?
I would test it asap .
Thanks .
Ok, so I tried the @Teetoow method but without success...
First encounted difficulties to get the symbolic links into the jail because not permission to write a link from a jail into the basejail.
Then, while busy with the ./make.sh step inside the DocumentServer/core/Common/3dParty/ folder, i encountered following error:
clang++: error: no such file or directory: '/usr/home/sankayop/DocServer/DocumentServer/core/Common/3dParty/icu/linux_64/build/libicuuc.so.58'
clang++: error: no such file or directory: '/usr/home/sankayop/DocServer/DocumentServer/core/Common/3dParty/icu/linux_64/build/libicudata.so.58'
I did not try the @meowthink method because @a-kempka had issues with the updated DocumentServer and I am not super confident about my success in this story :)
But if somebody is willing to help or to do try it and comment, I would be happy to get my hands once more dirty ;)
I have a port for v8: https://github.com/MikaelUrankar/v8-ports/tree/6.8
I've updated @Teetoow 's patches: https://github.com/MikaelUrankar/core/tree/freebsd
I've started a port for DocumentServer/core: https://github.com/MikaelUrankar/onlyoffice-documentserver-ports
I'm not able to build sdkjs and server due to various issue with node/npm... (I don't know which version is compatible, but node8/10/12 fails)
Thank you for all your answers! I was busy do to my work. I'll have some time to get the latest version compiling under FreeBSD and then I'll try to create a fork in order to get it available in the main tree (I hope..)
Thank you for all your answers! I was busy do to my work. I'll have some time to get the latest version compiling under FreeBSD and then I'll try to create a fork in order to get it available in the main tree (I hope..)
Its a shame you didn't just upload your current progress... If you stop working next person needs to figure it out all-over again... :(
@Teetow: Already super glad that you do things for others and if we can
help ( although not sure I have all the skills), don't hesitate to make a
call :)
On Wed, 22 Jul 2020 at 18:07, Kjeld Schouten-Lebbing <
[email protected]> wrote:
Thank you for all your answers! I was busy do to my work. I'll have some
time to get the latest version compiling under FreeBSD and then I'll try to
create a fork in order to get it available in the main tree (I hope..)Its a shame you didn't just upload your current progress... If you stop
working next person needs to figure it out all-over again... :(—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ONLYOFFICE/DocumentServer/issues/79#issuecomment-662542144,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFP5VN7G5ENJDAHNDBHEWLDR44FEPANCNFSM4DAL3JUQ
.
@teetow: Already super glad that you do things for others and if we can help ( although not sure I have all the skills), don't hesitate to make a call :)
Well, this lit up my inbox =)
@Ornias1993 Its a shame you didn't just upload your current progress... If you stop working next person needs to figure it out all-over again...
I just uploaded all my work here through the patches and the associated documentation i wrote. I'm doing that on my free time (and I also have a work which is not coding..). If you are not happy about that, feel free to help the FreeBSD community by trying to patch the latest code version as I did in the past...
It's still encouraging to read this kind of messages....
@sankayop Already super glad that you do things for others and if we can help ( although not sure I have all the skills), don't hesitate to make a call :)
Thank you. First of all the main problem is the 5.6.2 version is still using node version 8.0 which has reached its end-of-life as mentioned here: https://github.com/nodejs/Release
Unfortunately this version is no more supported and may contains unresolved bugs! What a pity that the DocumentServer developers didn't updated their code to use newer version of node..
Since 2019.12.31 node V8 is no more available under FreeBSD...... It will complicates the use of latest DocumentServer version...
And i didn't succeed to use the @MikaelUrankar v8 port.. it doesn't compile
And i didn't succeed to use the @MikaelUrankar v8 port.. it doesn't compile
What's the error? Which FreeBSD version?
And i didn't succeed to use the @MikaelUrankar v8 port.. it doesn't compile
What's the error? Which FreeBSD version?
FreeBSD 12.1:
[root@paris /usr/ports/www/v8-ports]# make package
===> License BSD3CLAUSE accepted by the user
===> v8-8.4.371.22 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by v8-8.4.371.22 for building
===> Extracting for v8-8.4.371.22
=> SHA256 Checksum OK for v8-v8-8.4.371.22_GH0.tar.gz.
/bin/mkdir -p /usr/ports/www/v8-ports/work/v8-8.4.371.22/base/trace_event/common /usr/ports/www/v8-ports/work/v8-8.4.371.22/build /usr/ports/www/v8-ports/work/v8-8.4.371.22/buildtools /usr/ports/www/v8-ports/work/v8-8.4.371.22/third_party/googletest/src /usr/ports/www/v8-ports/work/v8-8.4.371.22/third_party/icu /usr/ports/www/v8-ports/work/v8-8.4.371.22/third_party/zlib /usr/ports/www/v8-ports/work/v8-8.4.371.22/tools/clang /usr/ports/www/v8-ports/work/v8-8.4.371.22/buildtools/third_party/libc++/trunk /usr/ports/www/v8-ports/work/v8-8.4.371.22/buildtools/third_party/libc++abi/trunk
/usr/bin/tar -xf /usr/ports/distfiles/build-1b904cc30093c25d5fd48389bd58e3f7409bcf80.tar.gz -C /usr/ports/www/v8-ports/work/v8-8.4.371.22/build
tar: Error opening archive: Failed to open '/usr/ports/distfiles/build-1b904cc30093c25d5fd48389bd58e3f7409bcf80.tar.gz'
Moreover npm-node8 port is no more available too..
Delete /usr/ports/distfiles/build-1b904cc30093c25d5fd48389bd58e3f7409bcf80.tar.gz and try again.
I've started a port: https://github.com/MikaelUrankar/onlyoffice-documentserver-ports
The install phase is not implemented, it seems some binaries are missing compared to linux...
@MikaelUrankar @Teetoow : Just a little spam to tell you I do like the momentum you are creating! Keep going!
Ok just a message to let you know that i succeed to get DocumentServer 5.6.2 compiling and working under FreeBSD. I did something wrong in my previous post: 5.6.2 version needs node10 and not node8. Since it is still available in the ports (until the end of the year) it will be easy for you to get it compiling and working.
I will post the associating patches and corresponding new documentation within few days.
Yes!!! Super cool! I'm looking forward to it.
Thanks once again @teetow
On Thu, Aug 20, 2020, 22:31 Teetoow notifications@github.com wrote:
Ok just a message to let you know that i succeed to get DocumentServer
5.6.2 compiling and working under FreeBSD. I did something wrong in my
previous post: 5.6.2 version needs node10 and not node8. Since it is still
available in the ports (until the end of the year) it will be easy for you
to get it compiling and working.
I will post the associating patches and corresponding new documentation
within few days.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ONLYOFFICE/DocumentServer/issues/79#issuecomment-677888101,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFP5VN7B6DNNTVMO5BR6K4DSBWB23ANCNFSM4DAL3JUQ
.
Yes!!! Super cool! I'm looking forward to it. Thanks once again @teetow
Dude, come on =)
Thank you for the work @Teetoow ..! I'm eagerly waiting for this to plug it with our Nextcloud instance.
Ok so you'll find the new FreeBSD_562.txt file which explains how to compile OnlyOffice 5.6.2 under FreeBSD.
Please note that developers have changed the build tools and now use python scripts from a specific git repository.
You will also find patches for the build_tools repository, the DocumentServer sources and a specific python script to compile DocumentServer under FreeBSD.
The FreeBSD_562.txt file will tell you what to do with all these files.
Since I only need DocumentServer I didn't tried to get other modules (desktop edition etc.) compiling under FreeBSD. But if someone can want to do the job you just have to put patches in the "patches" directory and they will be applied on the corresponding sources.
Due to this reason I limited the modules to be compiled to "server" only (it's the default.. Read comments in automate.py file for more information).
Last but not least, multimedia plugins are available. Unfortunately they use part of the Chromium sources (see desktop-sdk repository) which needs hard work to get it compiling under FreeBSD (I invite you to check chromium port for more information). Then I just disabled the compilation of this repository. Since chromium port is able to compile it under FreeBSD there is a solution. I let someone finish this part.
Let me know if you encounter troubles. I'll try to submit patches to the documentserver developers in order to get them available in the main stream.. I hope they will accept!
FreeBSD_562.txt
build_tools.diff.txt
automate.py.txt
core.patch.txt
sdkjs.patch.txt
server.patch.txt
web-apps.patch.txt
node10-shared.patch.txt
Dude, just make fork it and make a github branch... please...
you could also add a https://bugs.freebsd.org entry or, maybe better, a review on https://reviews.freebsd.org
@Ornias1993 I pulled the requests! Let's convince OnlyOffice developers to merge them into the main stream!
I did my job.
@Teetoow I see you created several PR, I cannot guarantee we merge them all, but you should change base branch of each of them to develop, we do not merge any PR to master
@ShockwaveNN You, as a person with write access, should be able to change the branches of the PR's and just ask him to fix it again... Might be more clear...
I may change base branch but this may cause conflict so it's better done by author
@ShockwaveNN I'm sorry I don't know well how github works and what kind of patch do you need.
I moved to the develop branch and I'm doing some tests. Once everything will be good I'll commit my changes.
For the moment I only see mismatches in the core package. All others changes seems to be still valid.
Should I really recreate all PR for all packages?
Should I really recreate all PR for all packages?
You should change base branch by yourself, no need to create new PR
Also please add descriptions for each PR with info, for example I see you remove grunt-mocha package from web-apps, but we need a reason of this deletion, link to issue or some other source with explanation why this is not working on FreeBSD.
Same for all other repos, lik in sdkjs you change syntax of cp command - need info why old syntax in incompatible with FreeBSD
Most of the explainations was in the PR but I redo everything. Hope it's good for you.
@Teetoow Thank you, some of our dev team currently on vacation, but I think we can merge simpler PR's
Ok so you'll find the new FreeBSD_562.txt file which explains how to compile OnlyOffice 5.6.2 under FreeBSD.
Please note that developers have changed the build tools and now use python scripts from a specific git repository.
You will also find patches for the build_tools repository, the DocumentServer sources and a specific python script to compile DocumentServer under FreeBSD.
The FreeBSD_562.txt file will tell you what to do with all these files.Since I only need DocumentServer I didn't tried to get other modules (desktop edition etc.) compiling under FreeBSD. But if someone can want to do the job you just have to put patches in the "patches" directory and they will be applied on the corresponding sources.
Due to this reason I limited the modules to be compiled to "server" only (it's the default.. Read comments in automate.py file for more information).Last but not least, multimedia plugins are available. Unfortunately they use part of the Chromium sources (see desktop-sdk repository) which needs hard work to get it compiling under FreeBSD (I invite you to check chromium port for more information). Then I just disabled the compilation of this repository. Since chromium port is able to compile it under FreeBSD there is a solution. I let someone finish this part.
Let me know if you encounter troubles. I'll try to submit patches to the documentserver developers in order to get them available in the main stream.. I hope they will accept!
FreeBSD_562.txt
build_tools.diff.txt
automate.py.txt
core.patch.txt
sdkjs.patch.txt
server.patch.txt
web-apps.patch.txt
node10-shared.patch.txt
Hi @Teetoow,
sorry for late reply, I have been sick the late days...
I just tried what you wrote in a jail but had following error at step 5 (automate.py):
1 warning generated.
clang++ -c -pipe -fvisibility=hidden -O2 -std=gnu++11 -Wall -Wextra -pthread -fPIC -DINTVER=5.6.0.0 -DINTERNAL_USE_ARRAY_AS_VECTOR -DLINUX -D_LINUX -DBUIDLER_OPEN_DOWNLOAD_ENABLED -DBUIDLER_OPEN_BASE64_ENABLED -
DQT_NO_DEBUG -DQT_PLUGIN -I. -I/oo/core/Common/3dParty/v8/v8 -I/oo/core/Common/3dParty/v8/v8/include -I/usr/local/include/node -I/usr/local/include -I/usr/local/lib/qt5/mkspecs/freebsd-clang -o core_build/linux_
64/release/obj/unicode_util.o ../../Common/DocxFormat/Source/Base/unicode_util.cpp
rm -f libdoctrenderer.so
clang++ -static-libstdc++ -static-libgcc -pthread -shared -o libdoctrenderer.so core_build/linux_64/release/obj/memorystream.o core_build/linux_64/release/obj/nativecontrol.o core_build/linux_64/release/obj/do
ctrenderer.o core_build/linux_64/release/obj/docbuilder.o core_build/linux_64/release/obj/docbuilder_p.o core_build/linux_64/release/obj/nativebuilder.o core_build/linux_64/release/obj/OfficeFileFormatChecke
r2.o core_build/linux_64/release/obj/pole.o core_build/linux_64/release/obj/unicode_util.o -L/oo/core/DesktopEditor/doctrenderer/../../build/lib/linux_64 -lgraphics -lkernel -lUnicodeConverter -lnode -L/usr/
local/lib
clang++: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-static-libgcc' [-Wunused-command-line-argument]
ld: error: unable to find library -lnode
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Stop.
make[1]: stopped in /oo/core/DesktopEditor/doctrenderer
*** Error code 1
Stop.
make: stopped in /oo/build_tools
Error (make): 1
Error (./make.py): 1
Where I did not follow the readme (FreeBSD_562.txt) is for:
ln -s /usr/local/bin/python2.7 /usr/bin/python replaced by ln -s /usr/local/bin/python2.7 /usr/local/bin/pythoncp -r /usr/ports/www/node10 /oo/node10 before applying patch and make install because I don't have write access in the /usr/ports (inside basejail...)I'll try to find a way to go but if by any means, this error sounds familiar, I would be happy to get your mind on this :)
thanks anyway,
ok, so actually, the error I got is more related to making and installing node10.
I overviewed following error:
sudo make reinstall
===> Deinstalling for node10
===> node10 not installed, skipping
===> Installing for node10-10.22.0
===> Checking if node10 is already installed
===> Registering installation for node10-10.22.0
(node10-10.22.0) /var/ports/oo/node10/work/stage//usr/local/bin/node - required shared library libnode.so.64 not found
[docserver] Installing node10-10.22.0...
Indeed sorry! I missgenerated the node10 patch... pkg-plist was wrong!
Here is the good node10 patch:
node10-shared.patch2.txt
Let me know if it works
Indeed sorry! I missgenerated the node10 patch... pkg-plist was wrong!
Here is the good node10 patch:
node10-shared.patch2.txtLet me know if it works
Thanks, node10 compiled perfectly.
now, automate.py is busy. I'll let you know...
next error happens while letting automate.py run:
In file included from ../../src/main.cpp:33:
../../src/cextracttools.h:999:25: warning: unused function 'string_replaceAll' [-Wunused-function]
static std::wstring string_replaceAll(std::wstring str, const std::wstring& from, const std::wstring& to)
^
../../src/cextracttools.h:1014:25: warning: unused function 'getXMLOptionsFromFile' [-Wunused-function]
static std::wstring getXMLOptionsFromFile(std::wstring xmlFileName)
^
../../src/cextracttools.h:1039:36: warning: unused function 'getConversionDirection' [-Wunused-function]
static const TConversionDirection getConversionDirection (const std::wstring &sArg3)
../../src/cextracttools.h:1157:17: warning: unused function 'compare_string_by_length' [-Wunused-function]
static bool compare_string_by_length (const std::wstring &x, const std::wstring &y)
18 warnings generated.
clang++ -Wl,-rpath,'$ORIGIN' -Wl,-rpath,'$ORIGIN/system' -Wl,--disable-new-dtags -static-libstdc++ -static-libgcc -pthread -o ../../../build/bin/linux_64/x2t core_build/linux_64/release/obj/cextracttools.o core
_build/linux_64/release/obj/OfficeFileFormatChecker2.o core_build/linux_64/release/obj/ASCConverters.o core_build/linux_64/release/obj/main.o -licuuc -l icudata -L/oo/docserver/core/X2tConverter/build/Qt/../
../../build/lib/linux_64 -lXlsFormatLib -lOdfFileWriterLib -lOdfFileReaderLib -lDocFormatLib -lPptFormatLib -lRtfFormatLib -lTxtXmlFormatLib -lASCOfficeDocxFile2Lib -lPPTXFormatLib -lDocxFormatLib -lCryptoPPLib
-lgraphics -lkernel -lUnicodeConverter -lPdfWriter -lPdfReader -lHtmlFile -lXpsFile -lDjVuFile -lHtmlRenderer -ldoctrenderer -L/usr/local/lib -lboost_regex
clang++: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-static-libgcc' [-Wunused-command-line-argument]
ld: error: undefined symbol: libiconv_open
>>> referenced by HelpFunc.cpp
>>> HelpFunc.o:(STR::toStdWStringSystem(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int)) in archive /oo/docserver/core/X2tConverter/build/Qt/../
../../build/lib/linux_64/libXlsFormatLib.a
ld: error: undefined symbol: libiconv
>>> referenced by HelpFunc.cpp
>>> HelpFunc.o:(STR::toStdWStringSystem(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int)) in archive /oo/docserver/core/X2tConverter/build/Qt/../
../../build/lib/linux_64/libXlsFormatLib.a
ld: error: undefined symbol: libiconv_close
>>> referenced by HelpFunc.cpp
>>> HelpFunc.o:(STR::toStdWStringSystem(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int)) in archive /oo/docserver/core/X2tConverter/build/Qt/../
../../build/lib/linux_64/libXlsFormatLib.a
ld: error: undefined symbol: libiconv_open
>>> referenced by rtfformatlib_source.cpp
>>> rtfformatlib_source.o:(RtfUtility::convert_string(std::__1::__wrap_iter<char const*>, std::__1::__wrap_iter<char const*>, int)) in archive /oo/docserver/core/X2tConverter/build/Qt/../../../buil
d/lib/linux_64/libRtfFormatLib.a
ld: error: undefined symbol: libiconv
>>> referenced by rtfformatlib_source.cpp
>>> rtfformatlib_source.o:(RtfUtility::convert_string(std::__1::__wrap_iter<char const*>, std::__1::__wrap_iter<char const*>, int)) in archive /oo/docserver/core/X2tConverter/build/Qt/../../../buil
d/lib/linux_64/libRtfFormatLib.a
ld: error: undefined symbol: libiconv_close
>>> referenced by rtfformatlib_source.cpp
>>> rtfformatlib_source.o:(RtfUtility::convert_string(std::__1::__wrap_iter<char const*>, std::__1::__wrap_iter<char const*>, int)) in archive /oo/docserver/core/X2tConverter/build/Qt/../../../buil
d/lib/linux_64/libRtfFormatLib.a
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Stop.
make[1]: stopped in /oo/docserver/core/X2tConverter/build/Qt
*** Error code 1
Stop.
make: stopped in /oo/docserver/build_tools
Error (make): 1
Error (./make.py): 1
I'll come back when I have a solution...
so, just to be sure, I just restarted it with the option server: ./automate.py server
also found it might be that I have to use -liconv parameter (https://stackoverflow.com/questions/58690874/error-while-compiling-c-program-on-aix-ld-0711-317-error-undefined-symbol) but I don't know where so I'll just wait for the output of automate...
I'll keep you informed.
(btw @Teetoow: how did you know what file to patch or even to look at!? I need your howto book :))
ok, same error, so I'll have to think a bit more...
ok, I think I got the clue but don't know how to solve it.
My supposition is following:
inside core/ASCOfficeXlsFile2/source/XlsFormat/Auxiliary/HelpFunc.cpp, on line 45, there's an include "iconv.h" that for some reason is perhaps not taken into account.
Nevertheless, I can find it in /usr/local/include/iconv.h (re-installed via sudo pkg install libiconv).
I'll keep searching...
ok, I think I got the clue but don't know how to solve it.
My supposition is following:
insidecore/ASCOfficeXlsFile2/source/XlsFormat/Auxiliary/HelpFunc.cpp, on line 45, there's an include "iconv.h" that for some reason is perhaps not taken into account.
Nevertheless, I can find it in/usr/local/include/iconv.h(re-installed viasudo pkg install libiconv).I'll keep searching...
It usually means a missing liconv somewhere: https://github.com/MikaelUrankar/onlyoffice-documentserver-ports/blob/master/files/patch-core_X2tConverter_build_Qt_X2tConverter.pri
It usually means a missing liconv somewhere: https://github.com/MikaelUrankar/onlyoffice-documentserver-ports/blob/master/files/patch-core_X2tConverter_build_Qt_X2tConverter.pri
Thanks @MikaelUrankar, I thought I found it and added -liconv in ../core/Common/base.pri but unfortunately, it was not the right place.
I'll try your modif :) and let know. Thanks anyway
It usually means a missing liconv somewhere: https://github.com/MikaelUrankar/onlyoffice-documentserver-ports/blob/master/files/patch-core_X2tConverter_build_Qt_X2tConverter.pri
Thanks @MikaelUrankar, I thought I found it and added
-liconvin../core/Common/base.pribut unfortunately, it was not the right place.
I'll try your modif :) and let know. Thanks anyway
Actually, it did not work because the base.pri was rewritten during execution. (I made the modif on line 273) but anyway, I'll go for your modif.
automate.py rewrite all the repositories during the execution. That's why I created the patches/freebsd/ subdir: update core.patch there in order to apply your updates.
Otherwise update the config file, update "update" to 0 and launch ./make.py rather than automate.py
@Teetoow & @MikaelUrankar : you are both too fast, my old server is still building :)))
Currently, I'm building the @MikaelUrankar version and if it does not work, I'll try back @Teetoow 's with the correction you proposed.
Thanks for your support anyway :)
Hi all, after a night of building, for th @MikaelUrankar version, it stopped with an error with Perl5 already being installed (wrong version it seemed) but because I was already ready to make the modification in the @Teetoow version, I switched to that version and these are the last lines I can see (it did not stop but there are still high warnings and errors...):
> [email protected]
> Warning Cannot include addon %1 into executable.
The addon must be distributed with executable as %2.
%1: /oo/docserver/server/build/server/SpellChecker/node_modules/nodehun/build/Release/nodehun.node
%2: path-to-executable/nodehun.node
added 167 packages from 137 contributors and audited 168 packages in 7.12s
found 27 vulnerabilities (2 low, 17 moderate, 7 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
> [email protected]
copy warning [file not exist]: /oo/docserver/build_tools/scripts/../../core/Common/3dParty/icu/linux_64/build/libicudata.so.58
copy warning [file not exist]: /oo/docserver/build_tools/scripts/../../core/Common/3dParty/icu/linux_64/build/libicuuc.so.58
copy warning [file not exist]: /oo/docserver/build_tools/scripts/../../core/Common/3dParty/v8/v8/out.gn/linux_64/icudtl.dat
Directory not copied. Error: [Errno 2] No such file or directory: '/oo/docserver/build_tools/scripts/../../DocumentBuilder/empty'
copy warning [file not exist]: /oo/docserver/build_tools/scripts/../../core/build/lib/linux_64/HtmlFileInternal
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5930 100 5930 0 0 30101 0 --:--:-- --:--:-- --:--:-- 29949
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 20439 100 20439 0 0 127k 0 --:--:-- --:--:-- --:--:-- 127k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6003 100 6003 0 0 39235 0 --:--:-- --:--:-- --:--:-- 39235
[sankayop@docserver /oo/docserver/build_tools/tools/freebsd]$
does it look ok ?
I'll check later on...
@sankayop yes! Compilation succeed. Enjoy.
Let me know if everything works and tell me what modifications you did
Good evening fellows,
I'm nearly giving up...
I suppose the jail is making my life a bit harder because I'm struggling with the configuration part where most of the time, I can't get the communication to happen properly...
Configuration: 3.
I had to add sysvshm="new" inside /etc/rc.d/jail in the host to get postgresql to initdb. Then, i could not perform the last line: psql -hlocalhost -Uonlyoffice -d onlyoffice -f /var/www/onlyoffice/documentserver/server/schema/postgresql/createdb.sql because of a permission denied... psql -Uonlyoffice -d onlyoffice -f /var/www/onlyoffice/documentserver/server/schema/postgresql/createdb.sql did work...
Configuration: 4.
service rabbitmq status gives me a
warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)
Distribution failed: {{:shutdown, {:failed_to_start_child, :net_kernel, {:EXIT, :nodistribution}}}, {:child, :undefined, :net_sup_dynamic, {:erl_distribution, :start_link, [[:"rabbitmqcli-12811-rabbit@docserver", :shortnames, 15000], false]}, :permanent, 1000, :supervisor, [:erl_distribution]}}
although I did changed the /etc/login.conf so that the lang=en_IE.UTF-8.
From there on, I get the Distribution failed at the other steps...
I guess a good night could help...
Next episode when the motivation will come back...
Well.. i really don't understand since I only use documentserver under a jail and I had no problem with "-liconv" nor postgresql.
I'm running FreeBSD 12.1, I create the jail like that:
# bsdinstall jail /path/to/jail/jailname
and my jail is configured as follow:
onlyoffice {
host.hostname = "onlyoffice-gateway.xxxxx";
ip4.addr = xxx.xxx.xxx.xxx;
ip6 = disable;
sysvmsg = "new";
sysvsem = "new";
sysvshm = "new";
}
I only use precompiled packages (except for node10 in order to get the libnode through the patch I gave).
The only things to take care if you specify a specific IP for the jail is:
Good evening @Teetoow , I found some energy to redo the whole thing with iocage (in place of ezjail) and the compilation of node10 happened without any issue.
Then, for build_tools, I had to modify the file referenced by @MikaelUrankar https://github.com/ONLYOFFICE/DocumentServer/issues/79#issuecomment-688340099 and then use the make.py (I did not succeed in including it in the core.patch.txt file you prepared). After that, I reached the end of the compilation (with the 27 warnings but I guess I can live with this).
Then, I got postgres to work after modifying /var/db/postgres/data96/postgresql.conf and pg_hba.conf
Then, for rabbitmq, I just didn't know where (inside /var/www/onlyoffice/documentserver/server/Common/config/default.json) to put the new password I had to create for guest user, so I decided (according to https://help.nextcloud.com/t/onlyoffice-secret-key-issue/56464/10) to put it in:
"secret": {
"browser": {"string": "mypassword", "file": "", "tenants": {}},
"inbox": {"string": "mypassword", "file": "", "tenants": {}},
"outbox": {"string": "mypassword", "file": ""},
"session": {"string": "mypassword", "file": ""}
},
(Is it correct?)
Finally, I did the modification you advised for nginx.conf and started all services without any error.
Nevertheless, in Nextcloud>Settings>OnlyOffice, I put the address of the documentserver and got following error:
Error when trying to connect (Client error: 'GET https://docserver.adoy.be/healthcheck' resulted in a '404 Not Found' response: 404 Not Found 404 Not Found nginx/1. (truncated...) )
And actually, when I put the same address in the browser, I do indeed get a 404 error.
Perhaps do I have to write another address? (I wrote https://docserver.mydomain.com (following address is both referenced in my dns server written in /etc/resolv.conf and I also wrote it in /etc/hosts, associated with the private domain address of docserver.
Last point, for the secret key requested in Nextcloud's settings, below the documentserver address, I put the same secret key I wrote in rabbitmq but not sure it is correct...
I will not have time to work on it before the end of the week but if you see something that does not seem correct, could you advice me?
Thanks in advance and sorry for all these demands...
Most helpful comment
I let you read the FreeBSD.txt file on my previous post which contains all the information in order to compile DocumentServer under FreeBSD, configure and use it with nginx :)
I also invite you to install it into a jail