You are not logged in.
I'm having a hard time setting up a development environment. Some of the packages I have installed aren't working,
=====================
REQUIRED: You need to install the binutils development package.
OPTIONAL: You need to install the python libxml2 package in order to build some packages.
REQUIRED: You need to install the ncurses development and/or static package(s).
=====================
so the tool uses gcc to check for header files
check_for_header() {
local header=$1
local sourcefile=$(mktemp /tmp/tmp.XXXXXXXXXX).c
local outfile=$(mktemp /tmp/tmp.XXXXXXXXXX)
mv -f ${sourcefile/.c/} $sourcefile
echo "#include <$header>" > $sourcefile
echo 'int main (void) { return 0; }' >> $sourcefile
rv=0
(gcc -o $outfile $sourcefile 2>/dev/null) || \
rv=1
rm -f $sourcefile $outfile
return $rv
}
check_for_header bfd.h fails
$ find / | grep bfd.h
/usr/include/bfd.h
xml2 issues with checking for the libxml2 module
$ sudo pacman -S libxml2
warning: libxml2-2.9.1-5 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...
Packages (1): libxml2-2.9.1-5
Total Installed Size: 8.37 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [################################################] 100%
(1/1) checking package integrity [################################################] 100%
(1/1) loading package files [################################################] 100%
(1/1) checking for file conflicts [################################################] 100%
(1/1) checking available disk space [################################################] 100%
(1/1) reinstalling libxml2 [################################################] 100%
$ python -m libxml2
/usr/bin/python: No module named libxml2
install some more stuff...
$ sudo pacman -Ss libxml
extra/libxml++ 2.36.0-1
C++ bindings to libxml2
extra/libxml++-docs 2.36.0-1
Developer documentation for libxml++
extra/libxml2 2.9.1-5 [installed]
XML parsing library, version 2
extra/python-lxml 3.3.5-1 [installed]
Python3 binding for the libxml2 and libxslt libraries
extra/python-lxml-docs 3.3.5-1
Python binding for the libxml2 and libxslt libraries (docs)
extra/python2-lxml 3.3.5-1 [installed]
Python2 binding for the libxml2 and libxslt libraries
extra/xmlsec 1.2.19-2
XML Security Library is a C library based on LibXML2
community/gambas3-gb-libxml 3.5.3-2 (gambas3)
libxml2 component
community/perl-xml-libxml 2.0116-2
Interface to the libxml library
community/python2-pyxmpp 1.1.2-3
Python XMPP and Jabber implementation based on libxml2
check_for_header ncurses.h fails even with ncurses installed
$ gcc -print-file-name=libncurses.a
libncurses.a
$ find / | grep ncurses.h
/usr/include/ncurses.h
So everything seems like it should work on arch. But gcc doesn't seem to use /usr/include even though package includes get installed there. So I think i need to update the gcc spec? I'm not sure about the python module though. It should work I think.
Also, we plan on moving to yocto, I'm wondering if any one has had any development experience with that. It seems arch isn't really popular for this type of thing but I love being able to keep things updated like git/qtcreator/meld and some other development tools we use. Ubuntu seems to get stuck in time, same with fedora.
Offline
What board you are developing for? You need cross-platform tools, e.g. for ARM Cortex platform you need arm-none-eabi-* packages https://www.archlinux.org/packages/?sor … =&flagged=
And Arch is perfectly fine for embedded development. Here are hello-world^H^H led blinking/UART examples for my STM32-F4 board https://github.com/anatol/stm32f4-examples that I developed on my home Arch computer.
Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster
Offline
The tool I'm trying to use creates the arm tool chain and the entire sysroot for the device. Its an iMX6. Basically it builds everything from scratch, packages a tool chain for developers and a root file system for deployment.
I think I found the issue with python, its using python3 where the libxml2 is installed for python2
Offline
I fixed the python issue /usr/bin/python => python2
The gcc and includes directory is confusing me so I might need to do a bit more debugging. It could be a problem with the script on arch failing and not having a compiling error. If you look at the end of this gcc ouput, /usr/includes is a definite include path. So its a bit of a mystery at the moment why the tool fails to include headers in there.
[kchaves@purist-vm ~]$ gcc -xc -E -v -
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-4.9-20140604/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-cloog-backend=isl --disable-cloog-version-check --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --disable-multilib --disable-werror --enable-checking=release
Thread model: posix
gcc version 4.9.0 20140604 (prerelease) (GCC)
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/cc1 -E -quiet -v - -mtune=generic -march=x86-64
ignoring nonexistent directory "/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/include
/usr/local/include
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/include-fixed
/usr/include
Offline
I'm fairly certain this is still a Manjaro issue. Closing, like the earlier thread. Binned.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
The OP asserts that he is now running Arch. Opening and moving to Other Architectures
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
The OP asserts that he is now running Arch. Opening and moving to Other Architectures
ooo just wait until jwr sees
OP -
that function doesn't look right.
gcc -E is neater and works fine... if I'm understanding your problem
check_for_header() { gcc -E - <<<"#include <${1}>" >/dev/null 2>&1; }
Last edited by stevenhoneyman (2014-06-27 13:01:10)
My: [ GitHub | AUR Packages ]
Offline
Well, the nice thing about the arch moderators is how quickly they move, its been days, still no access to the manjaro forums. So it was quicker just to set up an arch vm and reproduce the issue.
Any way, For binutils what it comes down to is either a bug or incompatible with the tool. The script is part of a purchased package that works on ubuntu and fedora. Both of which kind of stagnate for certain dev tools and each time they roll out a new lts its always a big upgrade. So arch it is now.
Any way, the header file bfd.h seems to cause a compile error.
//test.c
#include <bfd.h>
int main (void) { return 0; }
gcc -o test test.c
In file included from test.c:2:0:
/usr/include/bfd.h:35:2: error: #error config.h must be included before this header
#error config.h must be included before this header
^
The ncurses.h header works fine though building it. It seems to be a problem where gcc isn't printing the full path to the libncurses.a maybe? So libncurses check is probably ok to ignore.
check_for_header ncurses.h || \
required "You need to install the ncurses development package."
if [ ! -f $(gcc -print-file-name=libncurses.a) ]; then
required "You need to install the ncurses development and/or static package(s)."
fi
Although I probably shouldn't spend too much time on this particular tool. We want to move to yocto so... I might need another test vm!
Offline
That header checks to see if PACKAGE and PACKAGE_VERSION are defined... if that helps?
so adding
-DPACKAGE -DPACKAGE_VERSION
to your gcc line will "fix" it.
...but as for the original question, I misunderstood what you were asking - I really have no idea about embedded development
My: [ GitHub | AUR Packages ]
Offline
Ok in that case I might not be able to use this tool. Or I'll have to hammer through all of the packages it builds that uses the system binutils. Which might not be much. It could just be arm gcc and some other cross tool chain binaries for the host machine.
If any one has had any experience using yocto on arch it would be nice to know. I know it builds more of its own environment than the tool I'm using now so I probably could get it to work.
Offline
Off-topic: please change the subject to something that reflects your problem more precisely, e.g. "Problems building Yocto - cannot find packages"
Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster
Offline