You are not logged in.

#1 2012-04-01 13:08:21

ephan
Member
Registered: 2011-11-02
Posts: 171

[CODE] fatal error: glibconfig.h

I had no idea of where to post this, so Newbie Corner it is.

I am trying to build an application called "lingo-dictionary". The same thing happens when I build other elementary OS applications (pantheon-terminal, etc.). It all built fine when I used Ubuntu, and it builds fine for everyone, but now that I moved to Arch it doesn't work. I understand why (kinda), but I wonder if there's a way to fix it.

Basically, when I try to build lingo-dictionary from source I get:

[ 25%] Building C object CMakeFiles/lingo.dir/src/lingo-app.c.o
In file included from /usr/include/glib-2.0/glib/galloca.h:34:0,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /home/david/src/lingo-dictionary/build/src/lingo-app.c:5:
/usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/lingo.dir/src/lingo-app.c.o] Error 1
make[1]: *** [CMakeFiles/lingo.dir/all] Error 2
make: *** [all] Error 2

I don't have any more information that I can give, any ideas? Thank you.

Last edited by ephan (2012-04-05 10:18:15)

Offline

#2 2012-04-01 14:07:17

jelly
Administrator
From: /dev/null
Registered: 2008-06-10
Posts: 716

Re: [CODE] fatal error: glibconfig.h

Use an AUR package instead of compiling from source.
aur/pantheon-terminal-bzr 155-1 (2)
    A super lightweight, beautiful, and simple terminal from the Elementary project
aur/lingo-dictionary-bzr 73-4 (4)
    Dictionary application from the Elementary project

Offline

#3 2012-04-01 14:59:00

ephan
Member
Registered: 2011-11-02
Posts: 171

Re: [CODE] fatal error: glibconfig.h

But jelly, I work on this application as a developer, I need to be able to build from source.

Offline

#4 2012-04-01 15:13:52

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [CODE] fatal error: glibconfig.h

Did you make sure there are definitions in your CMakeLists.txt pertaining to pkg-config and glib?

Offline

#5 2012-04-01 18:53:35

ephan
Member
Registered: 2011-11-02
Posts: 171

Re: [CODE] fatal error: glibconfig.h

itsbrad212 wrote:

Did you make sure there are definitions in your CMakeLists.txt pertaining to pkg-config and glib?

I don't really know what you mean, I didn't set up Cmake, but here's the CMakeLists.txt:

cmake_minimum_required (VERSION 2.8)
project (lingo)

list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/vala)

#
# Base bits
#
set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
set (PKGDATADIR "${DATADIR}/lingo")
set (GETTEXT_PACKAGE "lingo")
set (RELEASE_NAME "Lightning lexicon.")
set (VERSION "0.8")
set (VERSION_INFO "Release")

#
# Niceties
#
set (ARCHIVE_NAME lingo-${VERSION})
add_custom_target (dist
    COMMAND bzr export --root=${ARCHIVE_NAME} ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    )

add_custom_target (distcheck
    COMMAND cd ${CMAKE_BINARY_DIR}
    && rm -rf ${ARCHIVE_NAME}
    && tar xf ${ARCHIVE_NAME}.tar.bz2
    && mkdir ${ARCHIVE_NAME}/build
    && cd ${ARCHIVE_NAME}/build
    && cmake -DCMAKE_INSTALL_PREFIX=../install -DGSETTINGS_LOCALINSTALL=ON .. -DCMAKE_MODULE_PATH=/usr/share/cmake
    && make -j8
    && make -j8 install
    && make check
    )
add_dependencies(distcheck dist)

add_custom_target (uninstall "${CMAKE_COMMAND}" -P
  "${CMAKE_SOURCE_DIR}/cmake/uninstall.cmake")

#
# config.h
#

configure_file (${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
add_definitions(-include config.h)

#
# Data
#
file (GLOB _datafiles "${CMAKE_CURRENT_SOURCE_DIR}/data/style/*")
install (FILES ${_datafiles} DESTINATION ${PKGDATADIR}/style)

install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/lingo.desktop DESTINATION /usr/share/applications)

#
# i18n
#
add_subdirectory(po)

#
# Lingo
#

set (LINGO_DEPS "json-glib-1.0;gtk+-3.0;sqlite3;libsoup-2.4;gee-1.0;granite;")

find_package(PkgConfig)
pkg_check_modules(JSON REQUIRED "json-glib-1.0")
pkg_check_modules(SQLITE3 REQUIRED "sqlite3")
pkg_check_modules(SOUP REQUIRED "libsoup-2.4")
pkg_check_modules(GTK+ REQUIRED "gtk+-3.0")
pkg_check_modules(GEE REQUIRED "gee-1.0")
#pkg_check_modules(UNIQUE REQUIRED "unique-1.0")
pkg_check_modules(DEPS REQUIRED ${LINGO_DEPS} gthread-2.0)

add_definitions(${DEPS_CFLAGS})

link_libraries(${DEPS_LIBRARIES})

link_directories(${DEPS_LIBRARY_DIRS})

find_package(Vala REQUIRED)
include(ValaVersion)
ensure_vala_version("0.12.0" MINIMUM)

include(ValaPrecompile)
vala_precompile(VALA_C
	src/lingo-app.vala
	src/lingo-window.vala
	src/lingo-database.vala
	src/lingo-dictview.vala
	src/lingo-settings.vala
	src/lingo-suggestentry.vala
	src/lingo-wordnik.vala
PACKAGES
	gtk+-3.0
    granite
	json-glib-1.0
	gee-1.0
	libsoup-2.4
	sqlite3
CUSTOM_VAPIS
    vapi/config.vapi
OPTIONS
    --thread
    -g
)

# Verbose GCC
#add_definitions(${CFLAGS} -Wall -Winit-self -Wwrite-strings -Wunreachable-code -Wstrict-prototypes )
add_executable(lingo ${VALA_C})

install(TARGETS lingo RUNTIME DESTINATION bin)

#
# GSettings Schema
#
include(GSettings)
add_schema("apps.lingo.gschema.xml")

I also found this, which tells me it's Arch-specific that glibconfig.h is somewhere else. The question is, though, where should I copy it to so that it works?
https://bugzilla.novell.com/show_bug.cgi?id=647579

Offline

#6 2012-04-05 10:17:43

ephan
Member
Registered: 2011-11-02
Posts: 171

Re: [CODE] fatal error: glibconfig.h

I just copied glibconfig.h (use locate glibconfig.h to find it) to: /usr/lib/glib-2.0/include/

It works now, thanks!

Offline

Board footer

Powered by FluxBB