Closed olaxe closed 2 years ago
Arm32 may be sufficient for users who run Raspi too
Arm32 may be sufficient for users who run Raspi too
Personally I use only arm64 for my Raspberry servers. Arm32 is for desktop use.
You can use the already existing build target make server
that builds the server for the current architecture (if you are on the raspberry pi). You can also just build the server and replace the binary from the official release. I've created a small docker setup that does exactly that.
AFAIK cross-compilation with golang can be achieved with a new build target, it seams too obvious that maybe there is a catch. However, I tested the build on the raspberry pi.
Adding arm64 docker images via docker buildx
would be great.
Versioned docker images would be even greater.
Thanks @crra I will test it. I cannot agree more @vaskozl Buildx and GitHub Workflow feature as well make my life so easier these days.
Any update on this? Any plan to get the official ARM64 image out?
@olaxe
Personally I use only arm64 for my Raspberry servers. Arm32 is for desktop use.
I think ARM64 doesn't really matter unless you have a Raspberry Pi 4 with >4GB RAM.
If there would be an ARM32 version available as a Docker container that would be (according to my Google searches) the only task management system on the Raspberry Pi (ARM32) with Docker. For me using Docker on ARM32 is more important than using ARM64 as Docker adds way more flexibility.
I see more often an arm64 bits available on Docker Hub and you will improve software performance. I bet on the future (64 bits)
@olaxe Surely ARM64 is the future. Unfortunately Linux in contrast to Windows does not allow running of 32 bit applications on a 64 bit OS so for the time being a think providing both an ARM32 and an ARM64 version of Focalboard would be the best solution.
On a server with only docker containers, running the 64 bits version has only advantages and you will find more images on Docker Hub.
Example docker-compose could be:
focalboard:
container_name: focalboard
restart: unless-stopped
build:
context: https://github.com/mattermost/focalboard.git#main
dockerfile: docker/Dockerfile
volumes:
- ./focalboard:/data
environment:
- VIRTUAL_HOST=focalboard.local
- VIRTUAL_PORT=8000
ports:
- "8000:80"
You should then be able to docker-compose build focalboard
, but I'm getting some NPM errors.
Building focalboard
Step 1/21 : FROM node:16.3.0 as nodebuild
---> a6abb7a3800e
Step 2/21 : WORKDIR /webapp
---> Running in 2b3f39922bc8
Removing intermediate container 2b3f39922bc8
---> 77b99f41e736
Step 3/21 : ADD webapp/ /webapp
---> 3e6d24b40fbd
Step 4/21 : RUN npm install --no-optional && npm run pack
---> Running in a316f0a81084
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup '/webapp/node_modules',
npm WARN cleanup [Error: ENOTEMPTY: directory not empty, rmdir '/webapp/node_modules/gifsicle'] {
npm WARN cleanup errno: -39,
npm WARN cleanup code: 'ENOTEMPTY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: '/webapp/node_modules/gifsicle'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm notice
npm notice New minor version of npm available! 7.15.1 -> 7.20.3
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.20.3>
npm notice Run `npm install -g npm@7.20.3` to update!
npm notice
npm ERR! code 1
npm ERR! path /webapp/node_modules/optipng-bin
npm ERR! command failed
npm ERR! command sh -c node lib/install.js
npm ERR! ⚠ Command failed: /webapp/node_modules/optipng-bin/vendor/optipng --version
npm ERR! /webapp/node_modules/optipng-bin/vendor/optipng: 1: /webapp/node_modules/optipng-bin/vendor/optipng: @@8�@@@@@@@�@@@@����: not found
npm ERR! /webapp/node_modules/optipng-bin/vendor/optipng: 2: /webapp/node_modules/optipng-bin/vendor/optipng: d: not found
npm ERR! /webapp/node_modules/optipng-bin/vendor/optipng: 1: /webapp/node_modules/optipng-bin/vendor/optipng: Syntax error: ";" unexpected
npm ERR! /webapp/node_modules/optipng-bin/vendor/optipng: 1: /webapp/node_modules/optipng-bin/vendor/optipng: ELF: not found
npm ERR!
npm ERR!
npm ERR! ⚠ optipng pre-build test failed
npm ERR! ℹ compiling from source
npm ERR! ✖ Error: Command failed: /bin/sh -c make install
npm ERR! pngrtran.c:99:1: warning: 'png_rtran_ok' defined but not used [-Wunused-function]
npm ERR! png_rtran_ok(png_structrp png_ptr, int need_IHDR)
npm ERR! ^~~~~~~~~~~~
npm ERR! ar: `u' modifier ignored since `D' is the default (see `U')
npm ERR! ar: `u' modifier ignored since `D' is the default (see `U')
npm ERR! ar: `u' modifier ignored since `D' is the default (see `U')
npm ERR! ar: `u' modifier ignored since `D' is the default (see `U')
npm ERR! pngxmem.c: In function 'pngx_malloc_rows_extended':
npm ERR! pngxmem.c:38:34: warning: comparison is always false due to limited range of data type [-Wtype-limits]
npm ERR! (pngx_alloc_size_t)height > (pngx_alloc_size_t)(-1) / sizeof(png_bytep))
npm ERR! ^
npm ERR! ar: `u' modifier ignored since `D' is the default (see `U')
npm ERR! /usr/bin/ld: ../libpng/libpng.a(pngrutil.o): in function `png_read_filter_row':
npm ERR! pngrutil.c:(.text+0x1e94): undefined reference to `png_init_filter_functions_neon'
npm ERR! collect2: error: ld returned 1 exit status
npm ERR! make[1]: *** [Makefile:100: optipng] Error 1
npm ERR! make: *** [Makefile:14: install] Error 2
npm ERR!
npm ERR! cd src/optipng && \
npm ERR! make install && \
npm ERR! cd ../..
npm ERR! make[1]: Entering directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/optipng'
npm ERR! cd ../libpng && \
npm ERR! make -f Makefile PNGLIBCONF_H_PREBUILT=pnglibconf.h.optipng && \
npm ERR! cd ../optipng
npm ERR! make[2]: Entering directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/libpng'
npm ERR! cp pnglibconf.h.optipng pnglibconf.h
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o png.o png.c
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngerror.o pngerror.c
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngget.o pngget.c
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngmem.o pngmem.c
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngpread.o pngpread.c
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngread.o pngread.c
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngrio.o pngrio.c
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngrtran.o pngrtran.c
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngrutil.o pngrutil.c
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngset.o pngset.c
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngtrans.o pngtrans.c
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngwio.o pngwio.c
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngwrite.o pngwrite.c
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngwtran.o pngwtran.c
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngwutil.o pngwutil.c
npm ERR! ar rcs libpng.a png.o pngerror.o pngget.o pngmem.o pngpread.o pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
npm ERR! ranlib libpng.a
npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngtest.o pngtest.c
npm ERR! gcc -L../zlib -o pngtest pngtest.o libpng.a -lz -lm
npm ERR! make[2]: Leaving directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/libpng'
npm ERR! cd ../opngreduc && \
npm ERR! make -f Makefile libopngreduc.a && \
npm ERR! cd ../optipng
npm ERR! make[2]: Entering directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/opngreduc'
npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -o opngreduc.o opngreduc.c
npm ERR! ar cru libopngreduc.a opngreduc.o
npm ERR! ranlib libopngreduc.a
npm ERR! make[2]: Leaving directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/opngreduc'
npm ERR! cd ../gifread && \
npm ERR! make -f Makefile libgifread.a && \
npm ERR! cd ../optipng
npm ERR! make[2]: Entering directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/gifread'
npm ERR! gcc -c -O2 -Wall -Wextra -o gifread.o gifread.c
npm ERR! ar cru libgifread.a gifread.o
npm ERR! ranlib libgifread.a
npm ERR! make[2]: Leaving directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/gifread'
npm ERR! cd ../pnmio && \
npm ERR! make -f Makefile libpnmio.a && \
npm ERR! cd ../optipng
npm ERR! make[2]: Entering directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/pnmio'
npm ERR! gcc -c -O2 -Wall -Wextra -o pnmin.o pnmin.c
npm ERR! gcc -c -O2 -Wall -Wextra -o pnmout.o pnmout.c
npm ERR! gcc -c -O2 -Wall -Wextra -o pnmutil.o pnmutil.c
npm ERR! ar cru libpnmio.a pnmin.o pnmout.o pnmutil.o
npm ERR! ranlib libpnmio.a
npm ERR! make[2]: Leaving directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/pnmio'
npm ERR! cd ../minitiff && \
npm ERR! make -f Makefile libminitiff.a && \
npm ERR! cd ../optipng
npm ERR! make[2]: Entering directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/minitiff'
npm ERR! gcc -c -O2 -Wall -Wextra -o tiffread.o tiffread.c
npm ERR! gcc -c -O2 -Wall -Wextra -o tiffutil.o tiffutil.c
npm ERR! ar cru libminitiff.a tiffread.o tiffutil.o
npm ERR! ranlib libminitiff.a
npm ERR! make[2]: Leaving directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/minitiff'
npm ERR! cd ../pngxtern && \
npm ERR! make -f Makefile libpngxtern.a && \
npm ERR! cd ../optipng
npm ERR! make[2]: Entering directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/pngxtern'
npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxread.o pngxread.c
npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxrbmp.o pngxrbmp.c
npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxrgif.o pngxrgif.c
npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxrjpg.o pngxrjpg.c
npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxrpnm.o pngxrpnm.c
npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxrtif.o pngxrtif.c
npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxio.o pngxio.c
npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxmem.o pngxmem.c
npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxset.o pngxset.c
npm ERR! ar cru libpngxtern.a pngxread.o pngxrbmp.o pngxrgif.o pngxrjpg.o pngxrpnm.o pngxrtif.o pngxio.o pngxmem.o pngxset.o
npm ERR! ranlib libpngxtern.a
npm ERR! make[2]: Leaving directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/pngxtern'
npm ERR! gcc -c -O2 -Wall -Wextra -I../cexcept -I../libpng -I../opngreduc -I../pngxtern -o optipng.o optipng.c
npm ERR! gcc -c -O2 -Wall -Wextra -I../cexcept -I../libpng -I../opngreduc -I../pngxtern -o optim.o optim.c
npm ERR! gcc -c -O2 -Wall -Wextra -I../cexcept -I../libpng -I../opngreduc -I../pngxtern -o bitset.o bitset.c
npm ERR! gcc -c -O2 -Wall -Wextra -I../cexcept -I../libpng -I../opngreduc -I../pngxtern -o ioutil.o ioutil.c
npm ERR! gcc -c -O2 -Wall -Wextra -I../cexcept -I../libpng -I../opngreduc -I../pngxtern -o ratio.o ratio.c
npm ERR! gcc -c -O2 -Wall -Wextra -I../cexcept -I../libpng -I../opngreduc -I../pngxtern -o wildargs.o wildargs.c
npm ERR! gcc -s -o optipng optipng.o optim.o bitset.o ioutil.o ratio.o wildargs.o ../opngreduc/libopngreduc.a ../pngxtern/libpngxtern.a ../libpng/libpng.a ../gifread/libgifread.a ../pnmio/libpnmio.a ../minitiff/libminitiff.a -lz -lm
npm ERR! make[1]: Leaving directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/optipng'
npm ERR!
npm ERR! at /webapp/node_modules/bin-build/node_modules/execa/index.js:231:11
npm ERR! at runMicrotasks (<anonymous>)
npm ERR! at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR! at async /webapp/node_modules/optipng-bin/lib/install.js:18:4
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-08-01T12_37_50_148Z-debug.log
ERROR: Service 'focalboard' failed to build: The command '/bin/sh -c npm install --no-optional && npm run pack' returned a non-zero code: 1
If anyone can make anything off this thaht would be cool.
AFAIK cross-compilation with golang can be achieved with a new build target, it seams too obvious that maybe there is a catch. However, I tested the build on the raspberry pi.
@chenilim if the Makefile was extended to include a cross-compilation target, would it be thinkable to in future attach x86 and ARM build assets to releases in GitHub? I know it'd be a bit of extra work but it'd facilitate self-hosting via YunoHost (see YunoHost-Apps/focalboard_ynh#9).
Do not forget arm64 docker images please :).
@Johennes can you please elaborate on how you achieved adding this new build target?
@fl0r1s I didn't actually but @crra mentioned he did in his comment above. There is a corresponding commit linked there.
FYI, you can build with following compose snippet:
focalboard:
container_name: focalboard
restart: unless-stopped
image: focalboard:latest
build:
context: https://github.com/crra/focalboard-native-docker.git#main
dockerfile: Dockerfile
args:
- focalboard_version=0.8.0
volumes:
- ./focalboard/db:/opt/focalboard/data
- ./focalboard/files:/opt/focalboard/fles
- "./kanban/focalboard/config-sqlite.json:/opt/focalboard/config.json"
environment:
- VIRTUAL_HOST=focalboard.local
- VIRTUAL_PORT=8000
- TZ=${TIMEZONE}
- UID=${PUID}
- GID=${PGID}
ports:
- "8000:8000"
networks:
- kanban
Just wanted to let you know some people may want to run it on their free Oracle Cloud, not just Raspberry Pi
@sTiKyt Please, be aware that the Pull Request Titel created by me may be Misleading.
It should allow for custom Compliation for most Architectures within Docker. It is not Limited to Arm/ Raspberry Pi Only.
It did work Previously, currently i am expieriencing the same Bug, as Described above. I will try my best too fix it again.
@sTiKyt Please, be aware that the Pull Request Titel created by me may be Misleading.
It should allow for custom Compliation for most Architectures within Docker. It is not Limited to Arm/ Raspberry Pi Only.
It did work Previously, currently i am expieriencing the same Bug, as Described above. I will try my best too fix it again.
Oh, my point was, often I see people say "RPI is too weak anyway" in similar discussions, that's why I remind that there is strong ARM hardware available
Example docker-compose could be:
focalboard: container_name: focalboard restart: unless-stopped build: context: https://github.com/mattermost/focalboard.git#main dockerfile: docker/Dockerfile volumes: - ./focalboard:/data environment: - VIRTUAL_HOST=focalboard.local - VIRTUAL_PORT=8000 ports: - "8000:80"
You should then be able to
docker-compose build focalboard
, but I'm getting some NPM errors.Building focalboard Step 1/21 : FROM node:16.3.0 as nodebuild ---> a6abb7a3800e Step 2/21 : WORKDIR /webapp ---> Running in 2b3f39922bc8 Removing intermediate container 2b3f39922bc8 ---> 77b99f41e736 Step 3/21 : ADD webapp/ /webapp ---> 3e6d24b40fbd Step 4/21 : RUN npm install --no-optional && npm run pack ---> Running in a316f0a81084 npm WARN cleanup Failed to remove some directories [ npm WARN cleanup [ npm WARN cleanup '/webapp/node_modules', npm WARN cleanup [Error: ENOTEMPTY: directory not empty, rmdir '/webapp/node_modules/gifsicle'] { npm WARN cleanup errno: -39, npm WARN cleanup code: 'ENOTEMPTY', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: '/webapp/node_modules/gifsicle' npm WARN cleanup } npm WARN cleanup ] npm WARN cleanup ] npm notice npm notice New minor version of npm available! 7.15.1 -> 7.20.3 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.20.3> npm notice Run `npm install -g npm@7.20.3` to update! npm notice npm ERR! code 1 npm ERR! path /webapp/node_modules/optipng-bin npm ERR! command failed npm ERR! command sh -c node lib/install.js npm ERR! ⚠ Command failed: /webapp/node_modules/optipng-bin/vendor/optipng --version npm ERR! /webapp/node_modules/optipng-bin/vendor/optipng: 1: /webapp/node_modules/optipng-bin/vendor/optipng: @@8�@@@@@@@�@@@@����: not found npm ERR! /webapp/node_modules/optipng-bin/vendor/optipng: 2: /webapp/node_modules/optipng-bin/vendor/optipng: d: not found npm ERR! /webapp/node_modules/optipng-bin/vendor/optipng: 1: /webapp/node_modules/optipng-bin/vendor/optipng: Syntax error: ";" unexpected npm ERR! /webapp/node_modules/optipng-bin/vendor/optipng: 1: /webapp/node_modules/optipng-bin/vendor/optipng: ELF: not found npm ERR! npm ERR! npm ERR! ⚠ optipng pre-build test failed npm ERR! ℹ compiling from source npm ERR! ✖ Error: Command failed: /bin/sh -c make install npm ERR! pngrtran.c:99:1: warning: 'png_rtran_ok' defined but not used [-Wunused-function] npm ERR! png_rtran_ok(png_structrp png_ptr, int need_IHDR) npm ERR! ^~~~~~~~~~~~ npm ERR! ar: `u' modifier ignored since `D' is the default (see `U') npm ERR! ar: `u' modifier ignored since `D' is the default (see `U') npm ERR! ar: `u' modifier ignored since `D' is the default (see `U') npm ERR! ar: `u' modifier ignored since `D' is the default (see `U') npm ERR! pngxmem.c: In function 'pngx_malloc_rows_extended': npm ERR! pngxmem.c:38:34: warning: comparison is always false due to limited range of data type [-Wtype-limits] npm ERR! (pngx_alloc_size_t)height > (pngx_alloc_size_t)(-1) / sizeof(png_bytep)) npm ERR! ^ npm ERR! ar: `u' modifier ignored since `D' is the default (see `U') npm ERR! /usr/bin/ld: ../libpng/libpng.a(pngrutil.o): in function `png_read_filter_row': npm ERR! pngrutil.c:(.text+0x1e94): undefined reference to `png_init_filter_functions_neon' npm ERR! collect2: error: ld returned 1 exit status npm ERR! make[1]: *** [Makefile:100: optipng] Error 1 npm ERR! make: *** [Makefile:14: install] Error 2 npm ERR! npm ERR! cd src/optipng && \ npm ERR! make install && \ npm ERR! cd ../.. npm ERR! make[1]: Entering directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/optipng' npm ERR! cd ../libpng && \ npm ERR! make -f Makefile PNGLIBCONF_H_PREBUILT=pnglibconf.h.optipng && \ npm ERR! cd ../optipng npm ERR! make[2]: Entering directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/libpng' npm ERR! cp pnglibconf.h.optipng pnglibconf.h npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o png.o png.c npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngerror.o pngerror.c npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngget.o pngget.c npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngmem.o pngmem.c npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngpread.o pngpread.c npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngread.o pngread.c npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngrio.o pngrio.c npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngrtran.o pngrtran.c npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngrutil.o pngrutil.c npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngset.o pngset.c npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngtrans.o pngtrans.c npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngwio.o pngwio.c npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngwrite.o pngwrite.c npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngwtran.o pngwtran.c npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngwutil.o pngwutil.c npm ERR! ar rcs libpng.a png.o pngerror.o pngget.o pngmem.o pngpread.o pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o npm ERR! ranlib libpng.a npm ERR! gcc -c -I../zlib -O2 -Wall -Wextra -o pngtest.o pngtest.c npm ERR! gcc -L../zlib -o pngtest pngtest.o libpng.a -lz -lm npm ERR! make[2]: Leaving directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/libpng' npm ERR! cd ../opngreduc && \ npm ERR! make -f Makefile libopngreduc.a && \ npm ERR! cd ../optipng npm ERR! make[2]: Entering directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/opngreduc' npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -o opngreduc.o opngreduc.c npm ERR! ar cru libopngreduc.a opngreduc.o npm ERR! ranlib libopngreduc.a npm ERR! make[2]: Leaving directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/opngreduc' npm ERR! cd ../gifread && \ npm ERR! make -f Makefile libgifread.a && \ npm ERR! cd ../optipng npm ERR! make[2]: Entering directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/gifread' npm ERR! gcc -c -O2 -Wall -Wextra -o gifread.o gifread.c npm ERR! ar cru libgifread.a gifread.o npm ERR! ranlib libgifread.a npm ERR! make[2]: Leaving directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/gifread' npm ERR! cd ../pnmio && \ npm ERR! make -f Makefile libpnmio.a && \ npm ERR! cd ../optipng npm ERR! make[2]: Entering directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/pnmio' npm ERR! gcc -c -O2 -Wall -Wextra -o pnmin.o pnmin.c npm ERR! gcc -c -O2 -Wall -Wextra -o pnmout.o pnmout.c npm ERR! gcc -c -O2 -Wall -Wextra -o pnmutil.o pnmutil.c npm ERR! ar cru libpnmio.a pnmin.o pnmout.o pnmutil.o npm ERR! ranlib libpnmio.a npm ERR! make[2]: Leaving directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/pnmio' npm ERR! cd ../minitiff && \ npm ERR! make -f Makefile libminitiff.a && \ npm ERR! cd ../optipng npm ERR! make[2]: Entering directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/minitiff' npm ERR! gcc -c -O2 -Wall -Wextra -o tiffread.o tiffread.c npm ERR! gcc -c -O2 -Wall -Wextra -o tiffutil.o tiffutil.c npm ERR! ar cru libminitiff.a tiffread.o tiffutil.o npm ERR! ranlib libminitiff.a npm ERR! make[2]: Leaving directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/minitiff' npm ERR! cd ../pngxtern && \ npm ERR! make -f Makefile libpngxtern.a && \ npm ERR! cd ../optipng npm ERR! make[2]: Entering directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/pngxtern' npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxread.o pngxread.c npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxrbmp.o pngxrbmp.c npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxrgif.o pngxrgif.c npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxrjpg.o pngxrjpg.c npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxrpnm.o pngxrpnm.c npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxrtif.o pngxrtif.c npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxio.o pngxio.c npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxmem.o pngxmem.c npm ERR! gcc -c -O2 -Wall -Wextra -I../libpng -I../gifread -I../pnmio -I../minitiff -o pngxset.o pngxset.c npm ERR! ar cru libpngxtern.a pngxread.o pngxrbmp.o pngxrgif.o pngxrjpg.o pngxrpnm.o pngxrtif.o pngxio.o pngxmem.o pngxset.o npm ERR! ranlib libpngxtern.a npm ERR! make[2]: Leaving directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/pngxtern' npm ERR! gcc -c -O2 -Wall -Wextra -I../cexcept -I../libpng -I../opngreduc -I../pngxtern -o optipng.o optipng.c npm ERR! gcc -c -O2 -Wall -Wextra -I../cexcept -I../libpng -I../opngreduc -I../pngxtern -o optim.o optim.c npm ERR! gcc -c -O2 -Wall -Wextra -I../cexcept -I../libpng -I../opngreduc -I../pngxtern -o bitset.o bitset.c npm ERR! gcc -c -O2 -Wall -Wextra -I../cexcept -I../libpng -I../opngreduc -I../pngxtern -o ioutil.o ioutil.c npm ERR! gcc -c -O2 -Wall -Wextra -I../cexcept -I../libpng -I../opngreduc -I../pngxtern -o ratio.o ratio.c npm ERR! gcc -c -O2 -Wall -Wextra -I../cexcept -I../libpng -I../opngreduc -I../pngxtern -o wildargs.o wildargs.c npm ERR! gcc -s -o optipng optipng.o optim.o bitset.o ioutil.o ratio.o wildargs.o ../opngreduc/libopngreduc.a ../pngxtern/libpngxtern.a ../libpng/libpng.a ../gifread/libgifread.a ../pnmio/libpnmio.a ../minitiff/libminitiff.a -lz -lm npm ERR! make[1]: Leaving directory '/tmp/702a4cfd-675d-413a-b73d-3220707998aa/src/optipng' npm ERR! npm ERR! at /webapp/node_modules/bin-build/node_modules/execa/index.js:231:11 npm ERR! at runMicrotasks (<anonymous>) npm ERR! at processTicksAndRejections (node:internal/process/task_queues:96:5) npm ERR! at async /webapp/node_modules/optipng-bin/lib/install.js:18:4 npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-08-01T12_37_50_148Z-debug.log ERROR: Service 'focalboard' failed to build: The command '/bin/sh -c npm install --no-optional && npm run pack' returned a non-zero code: 1
If anyone can make anything off this thaht would be cool.
To fix this, modify the npm install command step as follows: CPPFLAGS="-DPNG_ARM_NEON_OPT=0" npm install
I see that there is #1700 but it's not merged yet so if someone wants it to run on raspi you can use the Dockerfile below:
FROM golang AS builder
ARG TARGETARCH
ARG FOCALBOARD_REF
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get update
RUN apt-get install -y nodejs libtool automake autoconf nasm g++ make libpng-dev
RUN git clone -b ${FOCALBOARD_REF} --depth 1 https://github.com/mattermost/focalboard.git /focalboard
WORKDIR /focalboard
RUN sed -i "s/GOARCH=amd64/GOARCH=${TARGETARCH}/g" Makefile
RUN sed -i "s/npm install/CPPFLAGS=\"-DPNG_ARM_NEON_OPT=0\" npm install --no-optional/g" Makefile
RUN make prebuild
RUN make
RUN make server-linux-package
RUN tar xvzf dist/focalboard-server-*.tar.gz
FROM debian:stable-slim
COPY --from=builder /focalboard/focalboard/ /opt/focalboard/
WORKDIR /opt/focalboard
EXPOSE 8000
CMD /opt/focalboard/bin/focalboard-server
Command to run:
sudo docker build --build-arg TARGETARCH="arm64" --build-arg FOCALBOARD_REF="main" . -t myfocalboard
And once that is done you can run the container like:
sudo docker run -v "/home/mzfr/focalboard/focalboard-data:/data" -v "/home/mzfr/focalboard/focalboard-config:/config" -p 80:8000 myfocalboard
Just make sure that you have nobody
permissions on the focalboard-data
directory.
I took the dockerfile from here and made a few changes to make it work.
Running the command for the Dockerfile posted above, gave me this result: https://hastebin.com/jacasojovi.swift
Running "docker build -f docker/Dockerfile --platform linux/arm64 ." results in this: https://hastebin.com/cafagudira.swift
Arm64 vps from oracle. Any updates about arm64?
Got the exact same error as in @sgmihai (first log) without using docker; Raspberry Pi (64bit).
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=focalboard-server-git (v7.1.0 at the time of writing) with modifications:
also install libpng
before make prebuild
add (like suggested in this thread)
sed -i "s/GOARCH=amd64/GOARCH=arm64/g" Makefile
sed -i "s/npm install/CPPFLAGS=\"-DPNG_ARM_NEON_OPT=0\" npm install --no-optional/g" Makefile
In addition i had to remove these LDFLAGS
from focalboard/mattermost-plugin/Makefile
(before make prebuild
) as /usr/bin/ld
could not handle them /usr/bin/ld: cannot find "github.com/mattermost/focalboard/server/model.BuildNumber=dev": No such file or directory
LDFLAGS += -X "github.com/mattermost/focalboard/server/model.BuildNumber=$(BUILD_NUMBER)"
LDFLAGS += -X "github.com/mattermost/focalboard/server/model.BuildDate=$(BUILD_DATE)"
LDFLAGS += -X "github.com/mattermost/focalboard/server/model.BuildHash=$(BUILD_HASH)"
LDFLAGS += -X "github.com/mattermost/focalboard/server/model.Edition=plugin"
Official (ARM64) support would be great
Can you please provide the full PKGBUILD and Makefile you used ? It is not entirely clear to me from those instructions how to edit them. Thanks
I'm assuming this is still an ongoing problem trying to run this on a Pi? Sucks looks really good to run, if anyone knows something similar that can run on the Pi am I able to get those at all?
If not that's fine, I'll probably run this on an actual machine, just going to take longer.
@BloodshotPico as mentioned earlier it, I tried to implement it at #1700 which is not yet merged.
I looked at it again, and tried to resolve the Existing Merge Conflicts. Maybe it will be accepted now.
I don't know why it didn't go true last time. But in theory it allows for all OS's which are supported by the GO Compiler, if I remember it Correctly.
Summary: What the new capability is to compile the webapp to the ARM64 architecture.
How important this is to me and why: Today, more and more persons are using an ARM architecture and it would be nice to have access to the Focalboard web server
Importance: Medium
Use cases:
Additional context / similar features: Same feature as it is done for the AMD64 regarding the Makefile or a compiled version already available with all dependencies
Thanks