navit icon indicating copy to clipboard operation
navit copied to clipboard

How to compile on Raspberry PiOS bookworm?

Open adevoss opened this issue 2 years ago • 9 comments

What is the procedure to compile on PiOS bookworm? The commands on https://navit.readthedocs.io/en/trunk/development/linux_development.html return an error and there is no new navit file.

What branch to compile? trunk, master or other?

adevoss avatar Oct 30 '23 19:10 adevoss

Please post the log output of your commands and the exact steps you followed.

jkoan avatar Oct 31 '23 07:10 jkoan

Installed packages on Raspberry Pi PiOS bookworm (as described in docs, also installed build-essential):

sudo apt-get install cmake zlib1g-dev libpng-dev libgtk2.0-dev librsvg2-bin \
                     g++ gpsd gpsd-clients libgps-dev libdbus-glib-1-dev freeglut3-dev libxft-dev \
                     libglib2.0-dev libfreeimage-dev gettext protobuf-c-compiler libprotobuf-c-dev libspeechd-dev

To compile (as described in docs):

  • cloned repo trunk in directory-c
  • created directory-b
  • cd directory-b
  • cmake directory-c

(Trying to solve #1241) navit-compile.txt

adevoss avatar Oct 31 '23 16:10 adevoss

Everything seems fine. You only need to run make after cmake

jkoan avatar Oct 31 '23 16:10 jkoan

Thanks. Now I can test my PR.

adevoss avatar Oct 31 '23 17:10 adevoss

Please re-open.

  • created a local branch after cloning repo
  • added ~10 lines of code in 1 file
  • After compiling, the navit file is too big (2.6M vs 737K)
  • copied the navit file to /usr/bin over the official file
  • Navit does not start (see log file) 202311012209.log
  • Restored the official navit file. All fine.

What are extra steps to compile Navit successfully? I will create the PR so you can see the added lines of code.

adevoss avatar Nov 01 '23 21:11 adevoss

The size is probably explained by the fact that you compiled a dev build with debug symbols and what not (the default) This also explains why you can't copy it over to the original binary. Also with that the libraries of the Dev build are not where they are supposed to be for a Dev build. The easiest solution is to test the Dev build local with ./navit inside the build directory and that the navit folder. After you verified that your code is working you can then build a package to be able to install with your package manager or directly install the Dev build into your system. The first option would use cpack and the second "make install". The first option has the advantage that you can easily remove the package from the system using the package manager later on.

jkoan avatar Nov 02 '23 05:11 jkoan

Thanks. I thought right the opposite way: Replacing the binary is a good real world test. A package would be a bonus. First I'll test #1250 locally.

adevoss avatar Nov 02 '23 10:11 adevoss

Navit starts showing the map on the gps location. So now I have to go testing on the road.

adevoss avatar Nov 02 '23 11:11 adevoss

Navit starts showing the map on the gps location. So now I have to go testing on the road.

Just for you to know. It's also possible to use vehicle "demo" to set a start and end location and test with that in the comfort of your home ;)

jkoan avatar Nov 02 '23 12:11 jkoan

also possible to use vehicle "demo"

Thanks. Why didn't I read this earlier? :-) My PR #1259 is (almost) finished.

adevoss avatar Apr 12 '24 13:04 adevoss