OrcaSlicer icon indicating copy to clipboard operation
OrcaSlicer copied to clipboard

Fixes, refactors and enhances Linux build-scripts

Open rubienr opened this issue 9 months ago • 3 comments

Description

As a new OrcaSlicer user i found myself not being able to build from source on Ubuntu 24.10. The build script was broken (on Ubuntu 24.10).

  • potentially relates / fixes https://github.com/SoftFever/OrcaSlicer/issues/8095

Details

  • build_linux.sh
    • fixes wrong AppImage build folder
    • refactors script
    • enhances help text
  • harmonizes names to comply with other build_*.(sh|bat) scripts
    • BuildLinux.sh and BuildLinuxImage.sh
  • fixes file permissions
    • cmake inherits *.in-file permissions for target files
    • removes necessity for chmod 755 in scripts
  • linux.d/debian
    • removes false positive error message
  • updates documentation
    • makes help text more understandable
  • enables ANSI-colored output for GNU or Clang
  • adds -p flag to optionally disable PCH for boosting ccache hit rate

Notes

  • does not introduce new features
  • Dockerfile depends on PR changes but fix should not break it
  • no UI changes

Tests

  • tested manually:
    1. checked out git repo
    2. installed system deps: ./build_linux.sh -u
    3. built deps: ./build_linux.sh -d
    4. built slicer: ./build_linux.sh -s
    5. built AppImage: ./build_linux.sh -i
    6. started: build/OrcaSlicer_Linux_V2.3.0-dev.AppImage; started successfully
    7. started: build/package/bin/orca-slicer; started successfully

rubienr avatar Feb 01 '25 00:02 rubienr

Dear maintainer|s,

(@Noisyfox)

I would like to prepare the next PR (on top of this) where build_linux.sh can take an opt. arg to disable precompiled headers (SLIC3R_PCH=OFF) so that compiling with ccache can be broken down to about one minute.

Is there something i can do to help and make this PR review easier?

Kind regards, RR

rubienr avatar Feb 04 '25 01:02 rubienr

Thank you @rubienr Could you please take a look at the conflicts?

SoftFever avatar Mar 30 '25 12:03 SoftFever

Thank you @rubienr

You are welcome; thank you for maintaining this project!

Could you please take a look at the conflicts?

Conflicts fixed and also added missing export here:

https://github.com/SoftFever/OrcaSlicer/blob/c163d11fdb8cb781a08cf0c17d81c75c86d2b413/BuildLinux.sh#L52

Please trigger GH-actions before merging to main because a script name has changed.

Kind regards, rr

rubienr avatar Mar 30 '25 21:03 rubienr

Hi @SoftFever,

I measured the build duration of a regular build after rebase/branch switch:

rm -drf build
time ./build_linux.sh -spc
...
./build_linux.sh -spcC  2455,94s user 480,65s system 1723% cpu 2:50,39 total

Once cached (namely after 1st successful build with ccache enabled), when switching in between branches it usually builds in lesser than three minutes.

To enable caching, -c flag must be specified and ccache must be installed. No ccache configuration is required; it will use about 2GB disk space.

rubienr avatar May 06 '25 09:05 rubienr

Thank you @rubienr Could you please take a look at the conflicts?

Hello @SoftFever,

I kept this branch up to date and tested the changes since about February - no issues so far :smiley:

Can we merge the PR to main?

Kind regards, rr

rubienr avatar Jun 02 '25 16:06 rubienr

Hi @Noisyfox,

can we merge this PR or are there open tasks i missed to finish?

Kind regards, rr

rubienr avatar Jun 13 '25 20:06 rubienr