Closed GoogleCodeExporter closed 9 years ago
Can you attach the output of your 'configure' run, and your config.log file?
Do you happen to know where ucontext_t is defined in redhat 7.3?
Original comment by csilv...@gmail.com
on 23 Feb 2010 at 10:55
I have attached output of configure(build.log), and config.log
$ grep -R ucontext_t /usr/include
Binary file /usr/include/c++/4.1.2/i686-redhat-linux/bits/stdc++.h.gch/O0g.gch
matches
Binary file /usr/include/c++/4.1.2/i686-redhat-linux/bits/stdc++.h.gch/O2g.gch
matches
/usr/include/sys/ucontext.h: } ucontext_t;
/usr/include/ucontext.h:extern int getcontext (ucontext_t *__ucp) __THROW;
/usr/include/ucontext.h:extern int setcontext (__const ucontext_t *__ucp)
__THROW;
/usr/include/ucontext.h:extern int swapcontext (ucontext_t *__restrict __oucp,
/usr/include/ucontext.h: __const ucontext_t *__restrict
__ucp)
__THROW;
/usr/include/ucontext.h:extern void makecontext (ucontext_t *__ucp, void
(*__func)
(void),
grep: warning: /usr/include/gnome-xml/libxml: recursive directory loop
/usr/include/libguile/continuations.h: ucontext_t ctx;
Original comment by mailtome...@gmail.com
on 23 Feb 2010 at 11:04
Attachments:
Ah, here is the key point, from config.log:
---
In file included from /usr/include/signal.h:324,
from /usr/include/sys/ucontext.h:23,
from conftest.c:59:
/usr/include/ucontext.h:32: error: expected ')' before '*' token
/usr/include/ucontext.h:35: error: expected ';', ',' or ')' before '*' token
/usr/include/ucontext.h:39: error: expected ')' before '*' token
/usr/include/ucontext.h:48: error: expected ')' before '*' token
---
What it looks like, is that this version of gcc required you to #include some
other
header file before #including <ucontext.h> (or <sys/ucontext.h>), or the latter
wouldn't compile properly.
Does a quick look at ucontext.h show what this might be? Or you could just
attach
the ucontext.h here.
Original comment by csilv...@gmail.com
on 23 Feb 2010 at 11:09
Thanks for the quick response. I have attached ucontext.h, sys/ucontext.h
(sys.ucontext.h).
Original comment by mailtome...@gmail.com
on 23 Feb 2010 at 11:15
Attachments:
OK, I see the problem. It's actually the reverse of what I said before: if you
#include <sys/ucontext.h> instead of <ucontext.h>, redhat 7.3 barfs because
sys/ucontext tries to #include ucontext before it has finished defining
everything it
needs. This seems like a bug to me, and perhaps to others as well, since later
gcc's
don't have this issue.
Unfortunately, os x gets upset if ucontext.h is included instead of
sys/ucontext.h,
and now redhat 7.3 gets upset the other way around. I'm not sure the best way
to fix
this. In the short term, you can fix it by editing the 'configure' script,
find the
line that says
#include <sys/ucontext.h>
and change it to say
#include <ucontext.h>
instead. Then do a './configure && make'. It should work properly for you
this
time.
I'll try to figure out a better solution before the next release. It will
probably
involve an ugly hack of some sort. :-(
Original comment by csilv...@gmail.com
on 24 Feb 2010 at 12:24
Thanks.
I also modified src/stacktrace_x86-inl.h, src/getpc.h, src/profiler.cc to
include
ucontext.h instead of sys/ucontext.h.
Original comment by mailtome...@gmail.com
on 24 Feb 2010 at 1:51
OK, I've decided to handle this by just putting in a special-case for redhat 7
and
below, in configure.ac.
Now I just need to know how to identify redhat 7. Can you attach the contents
of your
/etc/issue file? Or some other file I can look at that describes this as a
redhat 7
system?
Original comment by csilv...@gmail.com
on 10 Mar 2010 at 7:08
Actually, it looks like the best file to attach is /etc/redhat-release, if it
exists
on your system.
Original comment by csilv...@gmail.com
on 10 Mar 2010 at 7:26
Never mind, I found it:
http://www.linuxquestions.org/questions/red-hat-31/looking-for-redhat-release-file-
for-rh45-538031/
I'll fix this up for the next release.
Original comment by csilv...@gmail.com
on 10 Mar 2010 at 7:30
This should be fixed in perftools 1.6, just released.
Original comment by csilv...@gmail.com
on 5 Aug 2010 at 8:49
Thanks a lot cslivers.
Original comment by mailtome...@gmail.com
on 24 Aug 2010 at 7:14
Original issue reported on code.google.com by
mailtome...@gmail.com
on 23 Feb 2010 at 10:47