Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - compiling core_os with 4.2.1 and errors: (8 Items)
   
compiling core_os with 4.2.1 and errors  
Hi,
Yesterday after i did a 'svn up' in my core_os directory i saw some files changed and tried to rebuild the os.
I have been constantly seeing 4.2.1 breaking on various archs ( previously ppc was problem, but as I dont use ppc based 
toys, i built only for x86 and ARM)
I remember cleanly building for x86 and ARM targets with 4.2.1, but now i am facing problems with ARM (be) 
----------------------
/usr/local/work/qnx632/host/linux/x86/usr/bin/qcc -V4.2.1,gcc_ntoarm -c -O -Wc,-Wall -Wc,-Wno-parentheses -Wc,-fno-
builtin  -DMALLOC_WRAPPER -D_LIBMALLOC  -DMALLOC_DEBUG -I/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g -O2  
  -I. -I/usr/local/src/qnx/src/core_os/lib/malloc/arm/so.be -I/usr/local/src/qnx/src/core_os/lib/malloc/arm/so.g.be -I/
usr/local/src/qnx/src/core_os/lib/malloc/arm -I/usr/local/src/qnx/src/core_os/lib/malloc -I/usr/local/src/qnx/src/
core_os/lib/malloc/dbg -I/usr/local/src/qnx/src/core_os/lib/malloc/common -I/usr/local/src/qnx/src/core_os/lib/c/alloc -
I/usr/local/src/qnx/src/core_os/lib/malloc/public -I/usr/local/src/qnx/stage/usr/include -I/usr/local/work/qnx632/target
/qnx6/usr/include      -g  -EB  -shared     -DVARIANT_so -DVARIANT_g -DVARIANT_be -Wc,-fno-strict-aliasing /usr/local/
src/qnx/src/core_os/lib/malloc/dbg/calloc.c 
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c: In function 'debug_calloc':
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: warning: the address of '__cdbt' will always evaluate as 
'true'
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of assignment
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/calloc.c:135: error: lvalue required as left operand of...
View Full Message
Re: compiling core_os with 4.2.1 and errors  
That one's known, but hasn't been committed yet.

Run the attached script from lib/malloc to generate a new builtinbt.h, like:

$ ./build_header > builtinbt.h

That's shorter than attaching the resulting file
Attachment: Text build_header.sh 1.53 KB
Re: compiling core_os with 4.2.1 and errors  
Thanks that solved the problem, new one now

==================================
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/mtrace.c: In function 'mtrace':
/usr/local/src/qnx/src/core_os/lib/malloc/dbg/mtrace.c:751: warning: the address of '__malloc_trace_filename' will never
 be NULL
/usr/local/work/qnx632/host/linux/x86/usr/bin/qcc -V4.2.1,gcc_ntoarm -c -O -Wc,-Wall -Wc,-Wno-parentheses -Wc,-fno-
builtin  -DMALLOC_WRAPPER -D_LIBMALLOC  -DMALLOC_DEBUG -I/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g -O2  
  -I. -I/usr/local/src/qnx/src/core_os/lib/malloc/arm/so.be -I/usr/local/src/qnx/src/core_os/lib/malloc/arm/so.g.be -I/
usr/local/src/qnx/src/core_os/lib/malloc/arm -I/usr/local/src/qnx/src/core_os/lib/malloc -I/usr/local/src/qnx/src/
core_os/lib/malloc/dbg -I/usr/local/src/qnx/src/core_os/lib/malloc/common -I/usr/local/src/qnx/src/core_os/lib/c/alloc -
I/usr/local/src/qnx/src/core_os/lib/malloc/public -I/usr/local/src/qnx/stage/usr/include -I/usr/local/work/qnx632/target
/qnx6/usr/include      -g  -EB  -shared     -DVARIANT_so -DVARIANT_g -DVARIANT_be -Wc,-fno-strict-aliasing /usr/local/
src/qnx/src/core_os/lib/malloc/dbg/new.cc 
In file included from /usr/local/src/qnx/stage/usr/include/stdlib.h:36,
                 from /usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc-lib.h:26,
                 from /usr/local/src/qnx/src/core_os/lib/malloc/dbg/new.cc:30:
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h: In member function 'int CheckedPtr<T>::operator==
(const T*)':
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h:192: warning: no return statement in function 
returning non-void
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h: In member function 'int CheckedPtr<T>::operator==
(CheckedPtr<T>)':
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h:193: warning: no return statement in function 
returning non-void
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h: In constructor 'CheckedPtr<T>::CheckedPtr(T*)':
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h:203: error: there are no arguments to '_mptr' that 
depend on a template parameter, so a declaration of '_mptr' must be available
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h:203: error: (if you use '-fpermissive', G++ will 
accept your code, but allowing the use of an undeclared name is deprecated)
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h:206: error: there are no arguments to '_musize' that 
depend on a template parameter, so a declaration of '_musize' must be available
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h: In member function 'CheckedPtr<T>& CheckedPtr<T>::operator=(T*)'
:
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h:217: error: there are no arguments to '_mptr' that 
depend on a template parameter, so a declaration of '_mptr' must be available
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h:220: error: there are no arguments to '_musize' that 
depend on a template parameter, so a declaration of '_musize' must be available
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h: In member function 'T& CheckedPtr<T>::operator*()':
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h:234: error: there are no arguments to 
'malloc_warning' that depend on a template parameter, so a declaration of 'malloc_warning' must be available
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h:239: error: there are no arguments to 
'malloc_warning' that depend on a template parameter, so a declaration of 'malloc_warning' must be available
/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h: In member function 'T* CheckedPtr<T>::operator->()':

/usr/local/src/qnx/src/core_os/lib/malloc/public/malloc_g/malloc.h:249: error: there are...
View Full Message
Re: compiling core_os with 4.2.1 and errors  
I'm working on that one.  It appears that it's only needed for debug builds, so you can probably do without it in most 
cases..

You can delete all so.g* directories under lib/malloc/, or just make them not build by putting a Makefile.dnm in each 
folder.

From Linux (and probably cygwin, maybe not Neutrino):

sada@sada:~/dev/trunk-42/src/lib/malloc$ find . -iname so.g* -exec touch {}/Makefile.dnm \;

I'm still working on the actual compile error, but unless you're debugging lib/malloc, it should be fine to just skip 
those parts for now.

   -Sada

Re: compiling core_os with 4.2.1 and errors  
Thanks Sada,
Thats solves one more and a new one here
-------------

make[5]: Leaving directory `/usr/local/src/qnx/src/core_os/services/kdebug/gdb/arm/le'
make[4]: Leaving directory `/usr/local/src/qnx/src/core_os/services/kdebug/gdb/arm'
make -j 1 -Cx86 -fMakefile install
make[4]: Entering directory `/usr/local/src/qnx/src/core_os/services/kdebug/gdb/x86'
make -j 1 -Co -fMakefile install
make[5]: /usr/local/work/qnx632/host/linux/x86/usr/bin/ntox86-gcc-4.2.1: Command not found
make[5]: Entering directory `/usr/local/src/qnx/src/core_os/services/kdebug/gdb/x86/o'
make[5]: /usr/local/work/qnx632/host/linux/x86/usr/bin/ntox86-gcc-4.2.1: Command not found
/bin/rm -f  /usr/local/src/qnx/src/core_os/services/kdebug/gdb/x86/o/gdb_kdebug
/usr/local/work/qnx632/host/linux/x86/usr/bin/ldbootstrap -Bstatic -u_start   -o/usr/local/src/qnx/src/core_os/services/
kdebug/gdb/x86/o/gdb_kdebug    cache_ctrl.o    cpu_init.o    cstart.o    do_traps.o    gdb.o    kdbgcpu.o    kprintf.o  
  main.o    mapping.o    outside.o    traps.o    vaddrinfo.o    x86_init.o  -L. -L/usr/local/src/qnx/stage/x86/lib/gcc/4
.2.1 -L/usr/local/src/qnx/stage/x86/lib -L/usr/local/src/qnx/stage/x86/usr/lib -L/usr/local/work/qnx632/target/qnx6/x86/
lib/gcc/4.2.1 -L/usr/local/work/qnx632/target/qnx6/x86/lib -L/usr/local/work/qnx632/target/qnx6/x86/usr/lib   -lkdutil  
     -L/usr/local/work/qnx632/target/qnx6/x86/lib -lc /usr/local/work/qnx632/host/linux/x86/usr/lib/gcc-lib///libgcc.a
ldbootstrap: Can't open "/usr/local/work/qnx632/host/linux/x86/usr/lib/gcc-lib///libgcc.a" (No such file or directory)
ldbootstrap: file kprintf.c: undefined symbol "__udivdi3"
ldbootstrap: file kprintf.c: undefined symbol "__umoddi3"

ldbootstrap: There are 0 unresolved references
make[5]: *** [/usr/local/src/qnx/src/core_os/services/kdebug/gdb/x86/o/gdb_kdebug] Error 1
make[5]: Leaving directory `/usr/local/src/qnx/src/core_os/services/kdebug/gdb/x86/o'
make[4]: *** [install] Error 2
make[4]: Leaving directory `/usr/local/src/qnx/src/core_os/services/kdebug/gdb/x86'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/usr/local/src/qnx/src/core_os/services/kdebug/gdb'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/usr/local/src/qnx/src/core_os/services/kdebug'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/usr/local/src/qnx/src/core_os/services'
make: *** [install] Error 2
---------------------------------

I have installed GCC 4.2.1 whatever available in the download section of Core tools, I don't have harddisk space compile
 the entire gcc stuff, and this release is around 2 months old (may be time for a new drop?)
Re: compiling core_os with 4.2.1 and errors  
That one is known too.  

I've been working around it by setting a symlink on Linux:

sudo ln -s $QNX_HOST/usr/lib/gcc-lib/i386-pc-nto-qnx6.3.0/4.2.1/libgcc.a $QNX_HOST/usr/lib/gcc-lib/libgcc.a

You can also set EXCLUDE_CPULIST=x86 if you don't need the x86 variant.


This problem should be resolved with the next gcc 4.2.1 drop.

Keep in mind that gcc 4.2.1 is still considered experimental, and we're still working on some code-migration and testing
.  Most outstanding problems will likely be resolved within the next few weeks though.
Re: compiling core_os with 4.2.1 and errors  
> I've been working around it by setting a symlink on Linux:
> 
> sudo ln -s $QNX_HOST/usr/lib/gcc-lib/i386-pc-nto-qnx6.3.0/4.2.1/libgcc.a $
> QNX_HOST/usr/lib/gcc-lib/libgcc.a

That is the wrong location of the 4.2.1 libgcc.a 
$QNX_HOST/usr/lib/gcc/i386-pc-nto-qnx6.3.0/4.2.1/libgcc.a.

> You can also set EXCLUDE_CPULIST=x86 if you don't need the x86 variant.
> 
> 
> This problem should be resolved with the next gcc 4.2.1 drop.

It is the $QNX_TARGET/usr/include/mk/qconf-*.mk files that that hardcode the path (gcc-lib) to libgcc.a which has 
changed between 3.3.5 and 4.2.1. An updated gcc 4.2 drop will not completely resolve this issue.

Regards,

Ryan Mansfield





Re: compiling core_os with 4.2.1 and errors  
I need the x86 build, As my 6.4M2 build from the project downloads is crashing on my system every now and then.

I am not very sure about what is happening, after playing with VMWare I decided to go with native installation. 6.4M2 
hangs while I try to compile my network driver.

A couple of 
# slay io-pkt-v4 
and
# io-pkt-v4 -d nfe
then, try to rebuild  my network driver keeps the shell unresponsive and make just stagnant not proceeding I had to 
logout and login to compile again. So I wanted to try out a kernel built with 4.2.1.

/Prem