<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-01-08 1:36 GMT+02:00 Denis Obrezkov <span dir="ltr"><<a href="mailto:denisobrezkov@gmail.com" target="_blank">denisobrezkov@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><div class="gmail-h5"><div class="gmail_quote">2017-01-08 1:27 GMT+02:00 Joel Sherrill <span dir="ltr"><<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="gmail-m_-3772172073207649162gmail-h5">On Sat, Jan 7, 2017 at 3:59 PM, Denis Obrezkov <span dir="ltr"><<a href="mailto:denisobrezkov@gmail.com" target="_blank">denisobrezkov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello, <div>I cloned rtems-tools from <a href="https://git.rtems.org/rtems-tools" target="_blank">https://git.rtems.org/rte<wbr>ms-tools</a></div><div>and I can't build them:</div><div><br></div><div><div>~/Projects/rtems/rtems-tools$ ./waf configure --prefix=$HOME/Projects/rtems/<wbr>4.11</div><div>Setting top to : /home/reprofy/Projects/rtems/r<wbr>tems-tools </div><div>Setting out to : /home/reprofy/Projects/rtems/r<wbr>tems-tools/build </div><div>Version : 4.12.516f9311e61f (4.12) </div><div>Checking for program 'python' : /usr/bin/python </div><div>Checking for python version : (2, 7, 9, 'final', 0) </div><div>Checking for 'gcc' (C compiler) : /usr/bin/gcc </div><div>Checking for 'g++' (C++ compiler) : /usr/bin/g++ </div><div>Checking for header alloca.h : yes </div><div>Checking for header fcntl.h : yes </div><div>Checking for header process.h : not found </div><div>Checking for header stdlib.h : yes </div><div>Checking for header string.h : yes </div><div>Checking for header strings.h : yes </div><div>Checking for header sys/file.h : yes </div><div>Checking for header sys/stat.h : yes </div><div>Checking for header sys/time.h : yes </div><div>Checking for header sys/types.h : yes </div><div>Checking for header sys/wait.h : yes </div><div>Checking for header unistd.h : yes </div><div>Checking for header vfork.h : not found </div><div>Checking for function getrusage : yes </div><div>Checking for program 'm4' : /usr/bin/m4 </div><div>Checking for header sys/wait.h : yes </div><div>Checking for function kill : yes </div><div>Checking for function open64 : not found </div><div>Checking for function stat64 : not found </div><div>'configure' finished successfully (0.585s)</div><div>reprofy@repdell:~/Projects/rte<wbr>ms/rtems-tools$ ./waf build install</div><div>Waf: Entering directory `/home/reprofy/Projects/rtems/<wbr>rtems-tools/build'</div><div>[ 5/145] Compiling rtemstoolkit/elftoolchain/libe<wbr>lf/elf.c</div><div>[ 12/145] Compiling rtemstoolkit/elftoolchain/libe<wbr>lf/elf_fill.c</div><div>[ 13/145] Compiling rtemstoolkit/elftoolchain/libe<wbr>lf/elf_flag.c</div><div>[ 14/145] Compiling rtemstoolkit/elftoolchain/libe<wbr>lf/elf_getarhdr.c</div><div>../rtemstoolkit/elftoolchain/l<wbr>ibelf/elf.c:34:29: error: expected expression before ‘,’ token</div><div> .libelf_arch = LIBELF_ARCH,</div><div> ^</div><div><br></div></div></div></blockquote><div><br></div></div></div><div>:LIBELF_ARCH is defined based on the architecture libelf is being compiled</div><div>for. The file elf.c is pretty simple and LIBELF is conditionally defined in this file:</div><div><br></div><div><a href="https://git.rtems.org/rtems-tools/plain/rtemstoolkit/elftoolchain/libelf/_libelf_config.h" target="_blank">https://git.rtems.org/rtems-to<wbr>ols/plain/rtemstoolkit/elftool<wbr>chain/libelf/_libelf_config.h</a><br></div><div><br></div><div>Since the definition of LIBARCH_ARCH is dependent on the host architecture,</div><div>what host are you compiling on?</div><div><br></div><div>Also the following command will show you all the gcc predefines. Is one of them</div><div>for the architecture in the libelf_config.h file?</div><div><br></div><div>gcc -dM -E - </dev/null | less</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-m_-3772172073207649162gmail-"><div dir="ltr"><div><div></div><div>Waf: Leaving directory `/home/reprofy/Projects/rtems/<wbr>rtems-tools/build'</div><div>Build failed</div><div> -> task in 'elf' failed (exit status 1): </div><div> {task 140143375691152: c elf.c -> elf.c.5.o}</div><div>['/usr/bin/gcc', '-pipe', '-g', '-O2', '-I/home/reprofy/Projects/rtem<wbr>s/rtems-tools/build', '-I/home/reprofy/Projects/rtem<wbr>s/rtems-tools/build/rtemstoolk<wbr>it/elftoolchain/libelf', '-I/home/reprofy/Projects/rtem<wbr>s/rtems-tools/rtemstoolkit/elf<wbr>toolchain/libelf', '-I/home/reprofy/Projects/rtem<wbr>s/rtems-tools/build/rtemstoolk<wbr>it/elftoolchain/common', '-I/home/reprofy/Projects/rtem<wbr>s/rtems-tools/rtemstoolkit/elf<wbr>toolchain/common', '../rtemstoolkit/elftoolchain/<wbr>libelf/elf.c', '-c', '-o', '/home/reprofy/Projects/rtems/<wbr>rtems-tools/build/rtemstoolkit<wbr>/elftoolchain/libelf/elf.c.5.o<wbr>']</div><span class="gmail-m_-3772172073207649162gmail-m_2010833925168565782gmail-HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="gmail-m_-3772172073207649162gmail-m_2010833925168565782gmail-m_9218728799202452601gmail_signature">Regards, Denis Obrezkov</div>
</font></span></div></div>
<br></span>______________________________<wbr>_________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman<wbr>/listinfo/users</a><br></blockquote></div><br></div></div>
</blockquote></div><br></div></div><div class="gmail_extra">Information about my host system:</div><div class="gmail_extra"><div class="gmail_extra">Debian GNU/Linux 8.6 (jessie) </div><div>SMP Debian 4.2.6-3~bpo8+2 (2015-12-14) x86_64 GNU/Linux</div><div><br></div><div>I thought, may be some symbols undefined, and _libelf_config.h can't define </div><div>LIBELF_ARCH, but actually I found out that __linux__ symbol is defined in my gcc.</div><span class="gmail-HOEnZb"><font color="#888888"><div><br></div></font></span></div><span class="gmail-HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="gmail-m_-3772172073207649162gmail_signature">Regards, Denis Obrezkov</div>
</font></span></div></div>
</blockquote></div><br>It seems that I found the solution.</div><div class="gmail_extra">This is my output from readelf program:</div><div class="gmail_extra"><div class="gmail_extra">readelf -h SomeFile</div><div class="gmail_extra">Заголовок ELF:</div><div class="gmail_extra"> Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 </div><div class="gmail_extra"> Класс: ELF64</div><div class="gmail_extra"> Данные: дополнение до 2, little endian</div><div class="gmail_extra"> Версия: 1 (current)</div><div class="gmail_extra"> OS/ABI: UNIX - System V</div><div class="gmail_extra"> Версия ABI: 0</div><div class="gmail_extra"> Тип: EXEC (Исполняемый файл)</div><div class="gmail_extra"> Машина: Advanced Micro Devices X86-64</div><div class="gmail_extra"> Версия: 0x1</div><div class="gmail_extra"> Адрес точки входа: 0x401bb0</div><div class="gmail_extra"> Начало заголовков программы: 64 (байт в файле)</div><div class="gmail_extra"> Начало заголовков программы: 584096 (байт в файле)</div><div class="gmail_extra"> Флаги: 0x0</div><div class="gmail_extra"> Размер этого заголовка: 64 (байт)</div><div class="gmail_extra"> Размер заголовков программы: 56 (байт)</div><div class="gmail_extra"> Число заголовков программы: 9</div><div class="gmail_extra"> Размер заголовков раздела: 64 (байт)</div><div class="gmail_extra"> Число заголовков раздела: 40</div><div class="gmail_extra"> Индекс табл. строк загол. раздела: 37</div><div><br></div><div>its fields are in Russian, so I just changed search fields in native-elf format script</div><div>and it works.</div><div><br></div>-- <br><div class="gmail_signature">Regards, Denis Obrezkov</div>
</div></div>