Potential problem in Makefile for libdivecomputer
Pablo Wolter
pwolter at gmail.com
Fri Mar 1 14:24:52 PST 2013
I think I found an issue with the manual installation of the libdivecomputer in Mac 10.8.
I got this during the make:
Pablos-MacBook-Pro:subsurface pwolter$ PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/"
Pablos-MacBook-Pro:subsurface pwolter$ echo $PKG_CONFIG_PATH
/usr/local/lib/pkgconfig/
Pablos-MacBook-Pro:subsurface pwolter$ make
updating version.h to 3.0.1-37-g36422d2f9ee1
Package libdivecomputer was not found in the pkg-config search path.
Perhaps you should add the directory containing `libdivecomputer.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libdivecomputer' found
CC main.c
Package libdivecomputer was not found in the pkg-config search path.
Perhaps you should add the directory containing `libdivecomputer.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libdivecomputer' found
CC dive.c
Package libdivecomputer was not found in the pkg-config search path.
Perhaps you should add the directory containing `libdivecomputer.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libdivecomputer' found
CC time.c
Package libdivecomputer was not found in the pkg-config search path.
Perhaps you should add the directory containing `libdivecomputer.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libdivecomputer' found
CC profile.c
profile.c:12:36: fatal error: libdivecomputer/parser.h: No such file or directory
compilation terminated.
make: *** [profile.o] Error 1
I checked the Makefile and found this:
# find libdivecomputer
# First deal with the cross compile environment and with Mac.
# For the native case, Linus doesn't want to trust pkg-config given
# how young libdivecomputer still is - so we check the typical
# subdirectories of /usr/local and /usr and then we give up. You can
# override by simply setting it here
#
ifeq ($(CC), i686-w64-mingw32-gcc)
# ok, we are cross building for Windows
LIBDIVECOMPUTERINCLUDES = $(shell $(PKGCONFIG) --cflags libdivecomputer)
LIBDIVECOMPUTERARCHIVE = $(shell $(PKGCONFIG) --libs libdivecomputer)
RESFILE = packaging/windows/subsurface.res
LDFLAGS += -Wl,-subsystem,windows
LIBWINSOCK = -lwsock32
else ifeq ($(UNAME), darwin)
LIBDIVECOMPUTERINCLUDES = $(shell $(PKGCONFIG) --cflags libdivecomputer)
LIBDIVECOMPUTERARCHIVE = $(shell $(PKGCONFIG) --libs libdivecomputer)
else
libdc-local := $(wildcard /usr/local/lib/libdivecomputer.a)
libdc-local64 := $(wildcard /usr/local/lib64/libdivecomputer.a)
libdc-usr := $(wildcard /usr/lib/libdivecomputer.a)
libdc-usr64 := $(wildcard /usr/lib64/libdivecomputer.a)
If you do a "uname" in Mac the name of the Os is Darwin … not darwin … so I changed it to capitol D and it did run make without any issue:
Pablos-MacBook-Pro:subsurface pwolter$ make
CC profile.c
CC info.c
CC equipment.c
CC divelist.c
CC deco.c
CC planner.c
CC parse-xml.c
CC save-xml.c
CC libdivecomputer.c
CC print.c
CC uemis.c
CC uemis-downloader.c
CC gtk-gui.c
CC statistics.c
CC file.c
CC cochran.c
CC device.c
CC download-dialog.c
CC prefs.c
CC webservice.c
CC sha1.c
CC gps.c
CC macos.c
mkdir -p share/locale/bg_BG.UTF-8/LC_MESSAGES/
msgfmt -c -o share/locale/bg_BG.UTF-8/LC_MESSAGES/subsurface.mo po/bg_BG.po
mkdir -p share/locale/de_CH.UTF-8/LC_MESSAGES/
msgfmt -c -o share/locale/de_CH.UTF-8/LC_MESSAGES/subsurface.mo po/de_CH.po
mkdir -p share/locale/de_DE.UTF-8/LC_MESSAGES/
msgfmt -c -o share/locale/de_DE.UTF-8/LC_MESSAGES/subsurface.mo po/de_DE.po
mkdir -p share/locale/es_ES.UTF-8/LC_MESSAGES/
msgfmt -c -o share/locale/es_ES.UTF-8/LC_MESSAGES/subsurface.mo po/es_ES.po
mkdir -p share/locale/fi_FI.UTF-8/LC_MESSAGES/
msgfmt -c -o share/locale/fi_FI.UTF-8/LC_MESSAGES/subsurface.mo po/fi_FI.po
mkdir -p share/locale/fr_FR.UTF-8/LC_MESSAGES/
msgfmt -c -o share/locale/fr_FR.UTF-8/LC_MESSAGES/subsurface.mo po/fr_FR.po
mkdir -p share/locale/nb_NO.UTF-8/LC_MESSAGES/
msgfmt -c -o share/locale/nb_NO.UTF-8/LC_MESSAGES/subsurface.mo po/nb_NO.po
mkdir -p share/locale/nl_NL.UTF-8/LC_MESSAGES/
msgfmt -c -o share/locale/nl_NL.UTF-8/LC_MESSAGES/subsurface.mo po/nl_NL.po
mkdir -p share/locale/pl_PL.UTF-8/LC_MESSAGES/
msgfmt -c -o share/locale/pl_PL.UTF-8/LC_MESSAGES/subsurface.mo po/pl_PL.po
mkdir -p share/locale/pt_PT.UTF-8/LC_MESSAGES/
msgfmt -c -o share/locale/pt_PT.UTF-8/LC_MESSAGES/subsurface.mo po/pt_PT.po
mkdir -p share/locale/ru_RU.UTF-8/LC_MESSAGES/
msgfmt -c -o share/locale/ru_RU.UTF-8/LC_MESSAGES/subsurface.mo po/ru_RU.po
mkdir -p share/locale/sk_SK.UTF-8/LC_MESSAGES/
msgfmt -c -o share/locale/sk_SK.UTF-8/LC_MESSAGES/subsurface.mo po/sk_SK.po
mkdir -p share/locale/sv_SE.UTF-8/LC_MESSAGES/
msgfmt -c -o share/locale/sv_SE.UTF-8/LC_MESSAGES/subsurface.mo po/sv_SE.po
gcc -headerpad_max_install_names -sectcreate __TEXT __info_plist packaging/macosx/Info.plist -o subsurface main.o dive.o time.o profile.o info.o equipment.o divelist.o deco.o planner.o parse-xml.o save-xml.o libdivecomputer.o print.o uemis.o uemis-downloader.o gtk-gui.o statistics.o file.o cochran.o device.o download-dialog.o prefs.o webservice.o sha1.o gps.o macos.o -L/opt/local/lib -lxml2 -lz -lpthread -liconv -lm -L/opt/local/lib -lxslt -lxml2 -lz -lpthread -liconv -lm -framework Cocoa -L/opt/local/lib -lgtk-quartz-2.0 -lgdk-quartz-2.0 -latk-1.0 -lpangocairo-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpango-1.0 -lm -lfreetype -lfontconfig -lcairo -lgobject-2.0 -lglib-2.0 -lintl /usr/local/lib/libdivecomputer.a -L/opt/local/lib -lusb-1.0 -framework Cocoa -L/opt/local/lib -lgtkmacintegration -lgtk-quartz-2.0 -lgdk-quartz-2.0 -latk-1.0 -lpangocairo-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpango-1.0 -lm -lfreetype -lfontconfig -lcairo -lgobject-2.0 -lglib-2.0 -lintl -framework CoreFoundation -framework CoreServices -L/opt/local/lib -lzip -lz -lpthread -lm -framework Cocoa -L/opt/local/lib -losmgpsmap -lgtk-quartz-2.0 -lsoup-2.4 -lgdk-quartz-2.0 -latk-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpango-1.0 -lm -lfreetype -lfontconfig -lcairo -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -L/opt/local/lib -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl
Afer that it did installed libdivecomputer!!!
Sorry I don't know how to fix the Makefile and submit it but the OS check has to be case insensitive or changed to capitol D in case in Mac the output of the uname command capitalize the first letter all the time.
Saludos,
Pablo Wolter
pwolter at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130301/32091e53/attachment-0001.html>
More information about the subsurface
mailing list