headers not found at compilation

Bug #671384 reported by NSLW
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LinuxDC++
Fix Released
Medium
Razzloss

Bug Description

Detailed description of the issue:
scons fails to detect any headers required for compilation. When i type scons in main directory I get:

scons: Reading SConscript files ...
CXX env variable is not set, attempting to use g++
Checking for g++ >= 4.1...(cached) yes
Checking for pkg-config... yes
Checking for gtk+-2.0 >= 2.10... yes
Checking for gthread-2.0 >= 2.4... yes
Checking for libglade-2.0 >= 2.4... yes
Checking for libnotify >= 0.4.1... yes
Checking for C++ header file boost/version.hpp... yes
Checking for C header file time.h... yes
Checking for C header file signal.h... yes
Checking for C header file unistd.h... yes
Checking for C library pthread... no
 pthread library not found
 Note: You might have the lib but not the headers

I've got headers for pthread.h in /usr/include directory.

Steps to reproduce:
1. get source from trunk
2. scons

Expected results:
Start compiling

Actual results:
No compilation

Version:
linuxdcpp from trunk (r400)

OS:
Fedora 14 32bit

Tags: build

Related branches

Revision history for this message
Razzloss (razzloss) wrote :

Ensure you have all the dependencies mentioned in Readme.txt installed. You'll need also the -devel versions (or -dev or whatever fedora names the packages).

If this doesn't fix the problem (== you had all the needed packages already) attach build/sconf/config.log to the bug report.

--RZ

Changed in linuxdcpp:
status: New → Incomplete
Revision history for this message
NSLW (nslw) wrote :

I've got all dependencies with dev packages installed.

Revision history for this message
Razzloss (razzloss) wrote :

Hmh, OK the order which things are checked in config is a bit odd.

1) Anyway try with the attached SConstruct (copy it to the root of the build dir) and please do "rm -rv build" before trying to rebuild to ensure that the config isn't cached.

2) What's the output of 'pkg-config --libs libnotify' on your system?

--RZ

Revision history for this message
Razzloss (razzloss) wrote :

And attach resulting config.log if the build doesn't succeed.

Revision history for this message
NSLW (nslw) wrote :

1) Compilation succeed

2) "pkg-config --libs libnotify" gives

-Wl,--export-dynamic -pthread -L/lib -lnotify -ldbus-glib-1 -lgmodule-2.0 -ldbus-1 -lpthread -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0

Revision history for this message
Razzloss (razzloss) wrote :

OK, for some reason libnotify libraries don't include libgtk-x11-2.0 on your system, which probably would have included the needed symbols. But then again, why would pthread test even need libraries for libnotify.

Steven: Any ideas? Just move the libnotify check to the end of config? (probably should do that anyway as it might speed up the config a bit, since every conftest after it seems to link to the libnotify libraries and there's a few of them)

--RZ

Changed in linuxdcpp:
status: Incomplete → Confirmed
Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

That's a possible fix, I guess. The real issue is why does SCons add libs to the environment before conf.Finish()? I'm assuming it's in case the conf.Check*() have library dependencies between them, but they should still make an option to not add libs until the end. That way each conf.Check*() gets a fresh environment and there are no strange linking errors.

As far as speed is concerned, the checks are cached anyway so it would only improve the initial run, and probably only by milliseconds.

NLSW: Fedora needs to fix their PREFIX/lib/pkgconfig/libnotify.pc to add gtk+-2.0 as a dependency. You might want to bring that up with them.

tags: added: build
removed: pthread
Revision history for this message
Razzloss (razzloss) wrote :

For what I gan gather from http://git.gnome.org/browse/libnotify/commit/?id=0eb56b2fcf16d5381011e0bae2cf942416dae55c and https://bugzilla.gnome.org/show_bug.cgi?id=622550 it's not a Fedora issue, but an intentional effort from the upstream libnotify.

And yes, the real issue here is SCons adding the previous libs to following checks, but unless you want to look into that I'd suggest we just move the libnotify check to the end. Or move the conf.env.ParseConfig('pkg-config --libs libnotify') in some if near the libglade and gthread parseconfigs (that would probably also fix it, didn't bother to test).

--RZ

Revision history for this message
Razzloss (razzloss) wrote :

Well, moved the libnotify check to last to fix immediate problems.

--RZ

Changed in linuxdcpp:
assignee: nobody → Razzloss (razzloss)
importance: Undecided → Medium
milestone: none → 1.1.0
status: Confirmed → Fix Committed
Changed in linuxdcpp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.