Compile problem under Linux Fedora 5

View: New views
4 Messages — Rating Filter:   Alert me  

Compile problem under Linux Fedora 5

by Jose-Marcio Martins da Cruz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello,

Someone (a sendmail X user) repported me problems compiling statethreads
under Fedora 5.

depmode=gcc3 /bin/sh ./depcomp \
cc -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DLINUX -O -g -O2 -c `test
-f 'sched.c' || echo './'`sched.c
sched.c: In function ‘st_thread_create’:
sched.c:892: erreur: ‘JB_SP’ undeclared (first use in this function)
sched.c:892: erreur: (Each undeclared identifier is reported only once
sched.c:892: erreur: for each function it appears in.)
make[3]: *** [sched.o] Erreur 1
make[3]: Leaving directory `/home/smXinstall/smX-0.0.0.0/statethreads'
make[2]: *** [all-recursive] Erreur 1
make[2]: Leaving directory `/home/smXinstall/smX-0.0.0.0/statethreads'
make[1]: *** [all] Erreur 2
make[1]: Leaving directory `/home/smXinstall/smX-0.0.0.0/statethreads'
make: *** [all-recursive] Erreur 1
[root@localhost smX-0.0.0.0]#

It seems that Fedora 5 doesn't define JB_SP :

# grep JB_SP /usr/include/*
# grep JB_SP /usr/include/*/*

glibc versions are :

# rpm -qa|grep glibc
glibc-devel-2.4-4
glibc-kernheaders-3.0-5.2
glibc-2.4-4
glibc-common-2.4-4
glibc-headers-2.4-4

Hardware is Intel 32 bits.

Regards,

Jose-Marcio

--
 ---------------------------------------------------------------
 Jose Marcio MARTINS DA CRUZ           Tel. :(33) 01.40.51.93.41
 Ecole des Mines de Paris              http://j-chkmail.ensmp.fr
 60, bd Saint Michel                http://www.ensmp.fr/~martins
 75272 - PARIS CEDEX 06      mailto:Jose-Marcio.Martins@...


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
State-threads-devel mailing list
State-threads-devel@...
https://lists.sourceforge.net/lists/listinfo/state-threads-devel

Re: Compile problem under Linux Fedora 5

by genesh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hmm, I have a sneaky suspicion that they finally made JB_SP a private
definition in new version of glibc (2.4). It's still defined  
internally in
sysdeps/i386/jmpbuf-offsets.h

Simple fix is to add this missing macro in md.h in the LINUX section:

#elif defined(__i386__)
#define MD_STACK_GROWS_DOWN

#if defined(__GLIBC__) && __GLIBC__ >= 2
#ifndef JB_SP
/* From sysdeps/i386/jmpbuf-offsets.h in glibc 2.4 */
#define JB_SP 4
#endif
#define MD_GET_SP(_t) (_t)->context[0].__jmpbuf[JB_SP]
#else

Please give it a try.  If it works, we'll add this to the next ST  
release.
Thanks!


On Mar 30, 2006, at 11:48 PM, Jose Marcio Martins da Cruz wrote:

>
> Hello,
>
> Someone (a sendmail X user) repported me problems compiling  
> statethreads
> under Fedora 5.
>
> depmode=gcc3 /bin/sh ./depcomp \
> cc -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DLINUX -O -g -O2 -c  
> `test
> -f 'sched.c' || echo './'`sched.c
> sched.c: In function ‘st_thread_create’:
> sched.c:892: erreur: ‘JB_SP’ undeclared (first use in this function)
> sched.c:892: erreur: (Each undeclared identifier is reported only once
> sched.c:892: erreur: for each function it appears in.)
> make[3]: *** [sched.o] Erreur 1
> make[3]: Leaving directory `/home/smXinstall/smX-0.0.0.0/statethreads'
> make[2]: *** [all-recursive] Erreur 1
> make[2]: Leaving directory `/home/smXinstall/smX-0.0.0.0/statethreads'
> make[1]: *** [all] Erreur 2
> make[1]: Leaving directory `/home/smXinstall/smX-0.0.0.0/statethreads'
> make: *** [all-recursive] Erreur 1
> [root@localhost smX-0.0.0.0]#
>
> It seems that Fedora 5 doesn't define JB_SP :
>
> # grep JB_SP /usr/include/*
> # grep JB_SP /usr/include/*/*
>
> glibc versions are :
>
> # rpm -qa|grep glibc
> glibc-devel-2.4-4
> glibc-kernheaders-3.0-5.2
> glibc-2.4-4
> glibc-common-2.4-4
> glibc-headers-2.4-4
>
> Hardware is Intel 32 bits.
>
> Regards,
>
> Jose-Marcio
>



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
State-threads-devel mailing list
State-threads-devel@...
https://lists.sourceforge.net/lists/listinfo/state-threads-devel

Re: Re: Compile problem under Linux Fedora 5

by Jose-Marcio Martins da Cruz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Gene wrote:

> Hmm, I have a sneaky suspicion that they finally made JB_SP a private
> definition in new version of glibc (2.4). It's still defined  internally in
> sysdeps/i386/jmpbuf-offsets.h
>
> Simple fix is to add this missing macro in md.h in the LINUX section:
>
> #elif defined(__i386__)
> #define MD_STACK_GROWS_DOWN
>
> #if defined(__GLIBC__) && __GLIBC__ >= 2
> #ifndef JB_SP
> /* From sysdeps/i386/jmpbuf-offsets.h in glibc 2.4 */
> #define JB_SP 4
> #endif
> #define MD_GET_SP(_t) (_t)->context[0].__jmpbuf[JB_SP]
> #else
>
> Please give it a try.  If it works, we'll add this to the next ST  release.

I've already did it. It segfaults. 8-(

Moreover, Fedora 5 come with glibc 2.4.4 (not the official 2.4 release).

For a reason I don't know, the glibc installed with Fedora 5 doesn't
have this header file (jmpbuf-offsets.h). glibc 2.4 (glibc from gnu web
site has this header but not Fedora distributed glibc).

glibc versions are :

# rpm -qa|grep glibc
glibc-devel-2.4-4
glibc-kernheaders-3.0-5.2
glibc-2.4-4
glibc-common-2.4-4
glibc-headers-2.4-4

Odd thing 8-(


--
 ---------------------------------------------------------------
 Jose Marcio MARTINS DA CRUZ           Tel. :(33) 01.40.51.93.41
 Ecole des Mines de Paris              http://j-chkmail.ensmp.fr
 60, bd Saint Michel                http://www.ensmp.fr/~martins
 75272 - PARIS CEDEX 06      mailto:Jose-Marcio.Martins@...


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
State-threads-devel mailing list
State-threads-devel@...
https://lists.sourceforge.net/lists/listinfo/state-threads-devel

Parent Message unknown Re: Compile problem under Linux Fedora 5

by genesh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This issue was resolved in just released version 1.7 of ST.

On Apr 14, 2006, at 2:06 PM, Jose Marcio Martins da Cruz wrote:

>
> Hi,
>
> Gene wrote:
>
>> Hmm, I have a sneaky suspicion that they finally made JB_SP a private
>> definition in new version of glibc (2.4). It's still defined  
>> internally in
>> sysdeps/i386/jmpbuf-offsets.h
>>
>
> Yes...
>
> I've got another answer from fedora devel list. (Ulrich Drepper  
> from Red Hat Inc.).
>
> *********************************************************************
>
> Jose Marcio Martins da Cruz wrote:
>
> >> I tried to define myself the value of JB_SP (4 - the same value  
> found in
> >> Fedora 4 headers), but the application segfaults.
>
>
> That value was never meant to be used by programs.  It was a value
> needed in the implementation and unfortunately it was placed in the
> public header.
>
> This is fixed now.  And for a good reason: you cannot access the  
> values
> at all anymore today.  The stored values are "encrypted".
>
> You can disable the encryption using the LD_POINTER_GUARD environment
> variable.  Unfortunately the glibc version so far in FC5 has a little
> bug.  The next update will allow you to specify LD_POINTER_GUARD=0.
>
> But this is really the wrong solution.  The program should be  
> rewritten
> to use __builtin_frame_address (see the gcc manual).
>
> -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧  
> Mountain View, CA ❖
>
> *********************************************************************
>
>
> --
>   ---------------------------------------------------------------
>   Jose Marcio MARTINS DA CRUZ           Tel. :(33) 01.40.51.93.41
>   Ecole des Mines de Paris              http://j-chkmail.ensmp.fr
>   60, bd Saint Michel                http://www.ensmp.fr/~martins
>   75272 - PARIS CEDEX 06      mailto:Jose-Marcio.Martins@...
>
>



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
State-threads-devel mailing list
State-threads-devel@...
https://lists.sourceforge.net/lists/listinfo/state-threads-devel
LightInTheBox - Buy quality products at wholesale price!