Build for arm64 proccesor from source

Hi, I’m new here using corteza App, and I want to install it on a vps server with arm64 proccesor
Go version = go1.23.1 linux/arm64
yarn = v1.22.22
nodejs = v16.20.2

I can build it with the command make build

# GOOS=linux GOARCH=arm64 go build -ldflags "-X [github.com/cortezaproject/corteza/server/pkg/version.Version=](https://github.com/cortezaproject/corteza/server/pkg/version.Version=) " -o build/corteza-server--linux-arm64 cmd/corteza/main.go

but I have this error when try to start it

./corteza-server--linux-arm64 serve-api

could not start Corteza: app setup failed: locale service setup: could not find en in loaded languages; if this is development environment set ENVIRONMENT=dev or LOCALE_DEVELOPMENT_MODE=true, or run make -C pkg/locale if you want to embed languages before bulding server binary

and I try with

./corteza-server--linux-arm64 serve-api --env-file=./.env

and I try setting the ENVIRONMENT=dev en .env and the make -C pkg/locale but not work for me, it give me same error
Could you tell me what is the correct command so that I can compile correctly?

*UPDATE
I cam build it with this url
i use https://github.com/cortezaproject/corteza/tree/2023.9.x

copy fies README.md LICENSE CONTRIBUTING.md DCO .env.example
to folder server, then
followin steps

make release

that is all
run ( make release-clean ) if you already make a previus failed build

you will found a new folder named build, and inside this folder you will find binaries

and it work for arm64 proccesor for me

I cam build it with this url
i use https://github.com/cortezaproject/corteza/tree/2023.9.x

copy fies README.md LICENSE CONTRIBUTING.md DCO .env.example
to folder server, then go to the folder server and inside folder server
run the followin command

make release

that is all
run ( make release-clean ) if you already make a previus failed build

you will found a new folder named build, and inside this folder you will find binaries

and it work for arm64 proccesor for me

****UPDATE

I have new error but may i need user previos version of dart-sass-1.79.2
I will try a previos vesion and update this comment tomorrow

{“level”:“error”,“ts”:1727491071.9842358,“msg”:“sass compilation failure”,“error”:“connection is shut down”}
{“level”:“error”,“ts”:1727491071.9846036,“msg”:“sass compilation for custom css failed”,“error”:“connection is shut down”}
{“level”:“error”,“ts”:1727491071.985386,“msg”:“sass compilation failure”,“error”:“connection is shut down”}
{“level”:“error”,“ts”:1727491071.985437,“msg”:“sass compilation for custom css failed”,“error”:“connection is shut down”}
{“level”:“error”,“ts”:1727491071.9858902,“msg”:“sass compilation failure”,“error”:“connection is shut down”}
{“level”:“error”,“ts”:1727491071.9862237,“msg”:“sass compilation failure”,“error”:“connection is shut down”}
{“level”:“error”,“ts”:1727491071.9862587,“msg”:“sass compilation for custom css failed”,“error”:“connection is shut down”}
{“level”:“error”,“ts”:1727491071.9866948,“msg”:“sass compilation failure”,“error”:“connection is shut down”}
{“level”:“warn”,“ts”:1727491071.9921486,“logger”:“http.apigw”,“msg”:“profiler enabled only for routes with a profiler prefilter, use global setting to enable for all (APIGW_PROFILER_GLOBAL)”}
{“level”:“warn”,“ts”:1727491071.9923103,“logger”:“http.apigw”,“msg”:“profiler enabled only for routes with a profiler prefilter, use global setting to enable for all (APIGW_PROFILER_GLOBAL)”}
{“level”:“warn”,“ts”:1727491071.9940283,“logger”:“http.apigw”,“msg”:“profiler enabled only for routes with a profiler prefilter, use global setting to enable for all (APIGW_PROFILER_GLOBAL)”}

UPDATE
dart-sass-1.69.5 work CORTEZA work with ARM64 processor

My working setting with https

the .env file

#####################################
DOMAIN = 'corteza.mydomain.tld'
AUTH_BASE_URL ='https://corteza.mydomain.tld/auth'
AUTH_SESSION_COOKIE_SECURE = 'true' # Because I use https
HTTP_ADDR = 'LOCAL_IP_HERE:8585'  # used with proxy for domain
DB_DSN=postgres://DBUSER:DBPASSWORD@DB_IP_HOST:DB_PORT/DATABASE?sslmode=disable
HTTP_WEBAPP_ENABLED = 'true'
ACTIONLOG_ENABLED = 'true'
ENVIRONMENT = production
STORAGE_PATH = '/yourfolder/corteza/data'
CORREDOR_ADDR = 'corredor:8585'
HTTP_WEBAPP_ENABLED = 'true'
HTTP_WEBAPP_BASE_DIR = '/yourfolder/corteza/webapp'
SMTP_HOST = 'smtp-yoursmtp.com'
SMTP_PORT = 587
SMTP_TLS_INSECURE = 'false'
SMTP_TLS_SERVER_NAME = 'smtp-yoursmtp.com'
SMTP_USER = 'your@youremail.com'
SMTP_FROM = 'your@youremail.com'
SMTP_PASS = 'yourSMTPpassword'
LOCALE_PATH = '/yourfolder/corteza/src' 
LOCALE_LANGUAGES=“es,pt,en”   # My translations see link below to use it spanish and portuguese
LOCALE_LOG = 'true'
LOG_LEVEL = 'info'

## OPTIONAL ##
### usually not all is translated and for tranlations enable this for translate with your prefered words

LOCALE_RESOURCE_TRANSLATIONS_ENABLED = 'true'

## this line below # Enable this for debugging or developing. only

LOCALE_DEVELOPMENT_MODE = 'true'

#########################################
I made translation to Spanish en Portuguese if you want it donwload from here
https://github.com/eortigoza5/corteza-locale
#########################################

systemd service

nano /etc/systemd/system/corteza.service
[Unit]
Description=Iniciar Corteza app buiilder
Requires=sshd.service
After=sshd.service

[Service]
Type=idle
User=youruserhere
Group=youruserhere
StandardOutput=append:/yourfolder/corteza/log/output.log
StandardError=append:/yourfolder/corteza/log/error.log
WorkingDirectory=/yourfolder/corteza/
Environment=/yourfolder/dart-sass:/yourfolder/corteza/bin:$PATH
ExecStart=/yourfolder/corteza/bin/corteza-server serve-api
ExecStop=/bin/kill -- $MAINPID
TimeoutSec=30

[Install]
WantedBy=default.target

##################################
to install from source
in ubuntu

apt get install build-essential make automake git-core wget curl nano
# install go download your os version https://go.dev/dl/
# install node 16 with nvm from https://github.com/nvm-sh/nvm
npm install -g yarn &&
git clone https://github.com/cortezaproject/corteza.git
cd corteza/server/ &&
cp ../README.md ./
cp ../LICENSE . /
cp ../CONTRIBUTING.md ./ 
cp ../DCO ./ 

# then exec

make release

#will be a new folder named build and iside you will find the binaries

mv from build>pkg>corteza-server folder to a other folder from your choise example  /opt/corteza-server 
and cd /opt/corteza-server
download latest https://releases.cortezaproject.org/files/corteza-webapp-2023.9.8.tar.gz
from https://releases.cortezaproject.org/files/
# and
mkdir -p  /opt/corteza-server/webapp/
unzip it in the folder  /opt/corteza-server/webapp/
and add the path in the .env   # see example above

download  dart-sass especific to your operating sistem from here https://github.com/sass/dart-sass/releases/tag/1.70.0
# latest version from dart-sass no work for me version  1.70.0 work for me
unzip it on /opt  example =>  /opt/dart-sass
# you can add enviroment path in debian-ubuntu   
nano /etc/bash.bashrc
#add line
export PATH=$PATH:/opt/dart-sass:/opt/corteza-server/bin

your corteza folder must be something like this

and corteza server will work without docker container,

then
systemctl daemon-reload
systemctl start corteza.service
systemctl enable corteza.service
1 Like

for the systemd service need

[Unit]
Description=Iniciar Corteza app buiilder
Requires=sshd.service
After=sshd.service

[Service]
Type=idle
User=youruserhere
Group=youruserhere
StandardOutput=append:/yourfolder/corteza/log/output.log
StandardError=append:/yourfolder/corteza/log/error.log
WorkingDirectory=/yourfolder/corteza/
# put PATH Environment in quotes or it will not detect dart-sass
Environment="PATH=/yourfolder/dart-sass:/yourfolder/corteza/bin:$PATH"   
ExecStart=/yourfolder/corteza/bin/corteza-server serve-api
ExecStop=/bin/kill -- $MAINPID
TimeoutSec=30

[Install]
WantedBy=default.target