Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to compile on Raspberry PiOS bookworm? #1249

Closed
adevoss opened this issue Oct 30, 2023 · 10 comments
Closed

How to compile on Raspberry PiOS bookworm? #1249

adevoss opened this issue Oct 30, 2023 · 10 comments

Comments

@adevoss
Copy link

adevoss commented Oct 30, 2023

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?

@jkoan
Copy link
Member

jkoan commented Oct 31, 2023

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

@adevoss
Copy link
Author

adevoss commented Oct 31, 2023

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

@jkoan
Copy link
Member

jkoan commented Oct 31, 2023

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

@adevoss
Copy link
Author

adevoss commented Oct 31, 2023

Thanks.
Now I can test my PR.

@jkoan jkoan closed this as completed Oct 31, 2023
@adevoss
Copy link
Author

adevoss commented Nov 1, 2023

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.

@jkoan
Copy link
Member

jkoan commented Nov 2, 2023

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.

@adevoss
Copy link
Author

adevoss commented Nov 2, 2023

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
Copy link
Author

adevoss commented Nov 2, 2023

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

@jkoan
Copy link
Member

jkoan commented Nov 2, 2023

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 ;)

@adevoss
Copy link
Author

adevoss commented Apr 12, 2024

also possible to use vehicle "demo"

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

@adevoss adevoss closed this as completed Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants