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

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

    <bug>
          <bug_id>22295</bug_id>
          
          <creation_ts>2009-11-15 23:29:18 +0300</creation_ts>
          <short_desc>Не правильный путь хидерных файлов</short_desc>
          <delta_ts>2011-01-18 16:44:24 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>avr-gcc</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dmitry A. Kharitonov">kharpost</reporter>
          <assigned_to name="Grigory Milev">week</assigned_to>
          <cc>kharpost</cc>
    
    <cc>mike</cc>
    
    <cc>viy</cc>
    
    <cc>week</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103170</commentid>
    <comment_count>0</comment_count>
    <who name="Dmitry A. Kharitonov">kharpost</who>
    <bug_when>2009-11-15 23:29:18 +0300</bug_when>
    <thetext>Правильный путь такой:
/usr/include/avr</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103172</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2009-11-16 00:54:17 +0300</bug_when>
    <thetext>Остаётся Вам и поправить.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103189</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry A. Kharitonov">kharpost</who>
    <bug_when>2009-11-16 12:23:33 +0300</bug_when>
    <thetext>(В ответ на комментарий №1)
&gt; Остаётся Вам и поправить.
Руки дойдут -- займусь</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104546</commentid>
    <comment_count>3</comment_count>
    <who name="Grigory Milev">week</who>
    <bug_when>2009-12-19 01:13:23 +0300</bug_when>
    <thetext>А где он не правильный то?
Можно подетальнее?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104560</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry A. Kharitonov">kharpost</who>
    <bug_when>2009-12-19 14:27:21 +0300</bug_when>
    <thetext>Я считаю, что программы должны компилироваться без дополнительного указания путей.

[user@localhost CTRL6437]$ cat test.cpp
#include &lt;avr/io.h&gt;

int main() {
    uint8_t k=0,t=5;
    k=k+t;
}
[user@localhost CTRL6437]$ avr-gcc -Wall -Werror -g -Os -S -mint8 -mmcu=atmega8535 test.cpp
test.cpp:1:20: error: avr/io.h: No such file or directory
test.cpp: In function &apos;int main()&apos;:
test.cpp:4: error: &apos;uint8_t&apos; was not declared in this scope
test.cpp:4: error: expected `;&apos; before &apos;k&apos;
test.cpp:5: error: &apos;k&apos; was not declared in this scope
test.cpp:5: error: &apos;t&apos; was not declared in this scope
[user@localhost CTRL6437]$ avr-gcc -Wall -Werror -g -Os -S -mint8 -I/usr/include/avr -mmcu=atmega8535 test.cpp

А что? появился ответственный за пакет? я тогда ещё парочку багов повешу, намного серьёзней.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104561</commentid>
    <comment_count>5</comment_count>
    <who name="Dmitry A. Kharitonov">kharpost</who>
    <bug_when>2009-12-19 14:32:16 +0300</bug_when>
    <thetext>[user@localhost CTRL6437]$ avr-gcc -v -Wall -Werror -g -Os -S -mint8 -mmcu=atmega8535 test.cpp
Reading specs from /usr/lib/avr/lib/gcc/avr/4.2.2/specs
Target: avr
Configured with: ../configure --target=avr --host=i586-alt-linux --enable-languages=c,c++ --disable-nls --disable-libssp --enable-target-optspace --includedir=/usr/include/avr --prefix=/usr --exec-prefix=/usr/lib/avr --mandir=/usr/share/man --infodir=/usr/share/info --libexecdir=/usr/lib
Thread model: single
gcc version 4.2.2
 /usr/lib/avr/lib/gcc/avr/4.2.2/cc1plus -quiet -v -imultilib avr4 -iprefix /usr/bin/../lib/gcc/avr/4.2.2/ test.cpp -quiet -dumpbase test.cpp -mint8 -mmcu=atmega8535 -auxbase test -g -Os -Wall -Werror -version -o test.s -fno-rtti -fno-enforce-eh-specs -fno-exceptions
ignoring nonexistent directory &quot;/usr/bin/../lib/gcc/avr/4.2.2/../../../../../../avr/include/c++/4.2.2&quot;
ignoring nonexistent directory &quot;/usr/bin/../lib/gcc/avr/4.2.2/../../../../../../avr/include/c++/4.2.2/avr/avr4&quot;
ignoring nonexistent directory &quot;/usr/bin/../lib/gcc/avr/4.2.2/../../../../../../avr/include/c++/4.2.2/backward&quot;
ignoring nonexistent directory &quot;/usr/bin/../lib/gcc/avr/4.2.2/include&quot;
ignoring nonexistent directory &quot;/usr/bin/../lib/gcc/avr/4.2.2/../../../../../avr/sys-include&quot;
ignoring nonexistent directory &quot;/usr/bin/../lib/gcc/avr/4.2.2/../../../../../avr/include&quot;
ignoring nonexistent directory &quot;/usr/lib/avr/lib/gcc/avr/4.2.2/../../../../../../avr/include/c++/4.2.2&quot;
ignoring nonexistent directory &quot;/usr/lib/avr/lib/gcc/avr/4.2.2/../../../../../../avr/include/c++/4.2.2/avr/avr4&quot;
ignoring nonexistent directory &quot;/usr/lib/avr/lib/gcc/avr/4.2.2/../../../../../../avr/include/c++/4.2.2/backward&quot;
ignoring nonexistent directory &quot;/usr/lib/avr/lib/gcc/avr/4.2.2/../../../../../avr/sys-include&quot;
ignoring nonexistent directory &quot;/usr/lib/avr/lib/gcc/avr/4.2.2/../../../../../avr/include&quot;
#include &quot;...&quot; search starts here:
#include &lt;...&gt; search starts here:
 /usr/lib/avr/lib/gcc/avr/4.2.2/include
End of search list.
GNU C++ version 4.2.2 (avr)
        compiled by GNU C version 4.1.1 20070105 (ALT Linux, build 4.1.1-alt12).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: c5330874b383ef69ee2b5cc70c04cc58
test.cpp:1:20: error: avr/io.h: No such file or directory
test.cpp: In function &apos;int main()&apos;:
test.cpp:4: error: &apos;uint8_t&apos; was not declared in this scope
test.cpp:4: error: expected `;&apos; before &apos;k&apos;
test.cpp:5: error: &apos;k&apos; was not declared in this scope
test.cpp:5: error: &apos;t&apos; was not declared in this scope</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104571</commentid>
    <comment_count>6</comment_count>
    <who name="Grigory Milev">week</who>
    <bug_when>2009-12-19 17:26:19 +0300</bug_when>
    <thetext>Так никуда я и не пропадал ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117251</commentid>
    <comment_count>7</comment_count>
    <who name="Grigory Milev">week</who>
    <bug_when>2011-01-18 11:46:41 +0300</bug_when>
    <thetext>Добавлять хидеры AVR в системные пути - не разумно (будут сплошные пересечения), именно по этой причине они и лежат в /usr/include/avr. Не вижу проблемы указывать &lt;avr/zzz&gt; или добавлять опци. компилятору.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117266</commentid>
    <comment_count>8</comment_count>
    <who name="Dmitry A. Kharitonov">kharpost</who>
    <bug_when>2011-01-18 15:42:10 +0300</bug_when>
    <thetext>А в avr-* добавить некуда? Несовместимость с winavr получается. Это не удобно.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117268</commentid>
    <comment_count>9</comment_count>
    <who name="Grigory Milev">week</who>
    <bug_when>2011-01-18 15:55:33 +0300</bug_when>
    <thetext>Так и что я туда могу добавить то? Они пересекаются с системными и по названию, и по содержимому. Если сделать их просто доступными по штатным путям, то прийдется вагон остального линукс софта отучать брать avr хидеры, кому это надо? А совместимость с winavr делается легко на уровне Makefile.

Если у Вас есть другие правильные решения, продемонстрируйте пожалуйста.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117272</commentid>
    <comment_count>10</comment_count>
    <who name="Dmitry A. Kharitonov">kharpost</who>
    <bug_when>2011-01-18 16:14:34 +0300</bug_when>
    <thetext>У avr линковщик свой. Вот в него и нужно прописать этот путь.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117273</commentid>
    <comment_count>11</comment_count>
    <who name="Dmitry A. Kharitonov">kharpost</who>
    <bug_when>2011-01-18 16:30:36 +0300</bug_when>
    <thetext>(В ответ на комментарий №10)
&gt; У avr линковщик свой. Вот в него и нужно прописать этот путь.
вернее сказать компилятор свой avr-gcc вот в него и нужно прописать.
а как это может повлиять на gcc?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117275</commentid>
    <comment_count>12</comment_count>
    <who name="Grigory Milev">week</who>
    <bug_when>2011-01-18 16:36:09 +0300</bug_when>
    <thetext>Так линковщик хидеры не разгребает, этим препроцессор занимается. При сборке avr-gcc пути с инклюдами указываются именно туда, где они сейчас и лежат. Каким образом его обучить сразу знать данные места? Если имеете готовое решение/patch, с радостью добавлю к нашей сборке.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117277</commentid>
    <comment_count>13</comment_count>
    <who name="Dmitry A. Kharitonov">kharpost</who>
    <bug_when>2011-01-18 16:44:24 +0300</bug_when>
    <thetext>Хорошо. Я по-думаю над этим</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>