<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>5884</bug_id>
          
          <creation_ts>2005-01-16 18:00:52 +0300</creation_ts>
          <short_desc>some programm can&apos;t be built with kernel 2.6.10-std26-up-alt1 headers</short_desc>
          <delta_ts>2005-08-31 03:19:48 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>kernel-headers-std26-up</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="tszyn">sanja</reporter>
          <assigned_to name="Sergey Vlasov">vsu</assigned_to>
          
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>21126</commentid>
    <comment_count>0</comment_count>
    <who name="tszyn">sanja</who>
    <bug_when>2005-01-16 18:00:53 +0300</bug_when>
    <thetext>I got following error:  
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include    -g -O -DDBUG_ON  
-DSAFE_MUTEX -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W  
-Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings  
-Wunused  -mcpu=pentiumpro -DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG  
-DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX -O1  
-Wuninitialized   -MT bchange.o -MD -MP -MF &quot;.deps/bchange.Tpo&quot; \  
  -c -o bchange.o `test -f &apos;bchange.c&apos; || echo &apos;./&apos;`bchange.c; \  
then mv -f &quot;.deps/bchange.Tpo&quot; &quot;.deps/bchange.Po&quot;; \  
else rm -f &quot;.deps/bchange.Tpo&quot;; exit 1; \  
fi  
In file included from /usr/include/asm/percpu.h:4,  
                 from /usr/include/asm/processor.h:22,  
                 from /usr/include/asm/atomic.h:6,  
                 from ../include/my_global.h:291,  
                 from bfill.c:32:  
/usr/include/asm-generic/percpu.h:8: error: `CONFIG_NR_CPUS&apos; undeclared here  
(not in a function)  
 
Returning to old kernel &amp; headers remove problem 
Steps to Reproduce:
1. get mysql bk tree 5.0 (here is more details  
http://dev.mysql.com/doc/mysql/en/Installing_source_tree.html)  
2. run build script ./BUILD/compile-pentium-debug 
3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21128</commentid>
    <comment_count>1</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2005-01-17 09:46:29 +0300</bug_when>
    <thetext>reassign</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21134</commentid>
    <comment_count>2</comment_count>
    <who name="Sergey Vlasov">vsu</who>
    <bug_when>2005-01-17 15:28:32 +0300</bug_when>
    <thetext>In general, including kernel headers from userspace is wrong - headers from the
glibc-kernheaders package should be used for compilation.

#include &lt;asm/atomic.h&gt; should not be used in userspace for several reasons:

1) On some architectures the atomic operations from &lt;asm/atomic.h&gt; are not
available in user mode: e.g., see sparc, sparc64 - atomic_* functions are not
implemented as inlines; on some other architectures the required instructions
are privileged - see
http://mailman.uclinux.org/pipermail/uclinux-dev/2004-January/023757.html .

2) Even on i386 the result of compilation depends on the kernel configuration:
if the kernel was not configured as SMP, the lock prefix before instruction is
omitted, therefore the compiled code will not be SMP-safe, creating subtle bugs.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>