Geoclue: Where am I?

Hi folks,
I stumbled over this C file. I am wondering how to compile it by myself.

Calling this makefile

OBJ = main.o
EXE = main
CC = /usr/bin/gcc
CFLAGS = -Wall
all: $(EXE)
$(EXE): $(OBJ)
	$(CC) $(CFLAGS) $(OBJ) -o $(EXE)
main.o: main.c
	$(CC) -c main.c -o main.o

results in this error response on a GNU/Debian host.

$ make clean all
/bin/rm -f main.o main *~
/usr/bin/gcc -c main.c -o main.o
main.c:23:10: fatal error: config.h: No such file or directory
   23 | #include <config.h>

Do you recommend to compile it on a development host like this or rather on the target system? Compiling this file and setting up a development environment are my prerequisites to developing similar apps.

The target system is a GNU/Linux first phone running PostmarketOS.

My target app is a simple as possible GPS status display app. Later I also like to develop a simple as possible location tracker app used on GNU/Linux first phones for fleet management.

Any ideas or examples how to get started are very much appreciated!


PS: I am rather new to Alpine, GNOME and PostmarketOS but comfortable with the typical Debian, C and make build process.

I am wondering how to compile it by myself.

It is part of the project build, so

$ meson setup build
$ meson compile -C build
$ # executable now in build/demo/where-am-i
1 Like

Cheers @fmuellner for the quick and helpful reply.

It looks like my Debian host might not be the preferred build or development environment.

$ meson setup build
The Meson build system
Version: 0.56.2
Build type: native build ERROR: Meson version is 0.56.2 but project requires >= 0.60.0

I rather prefer to use a meson package part of a distribution instead of compiling it by myself. Is there a recommended build and development host/system that fulfils GNOME requirements like this one?


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.