LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 12-16-2011, 05:04 PM   #1
Ajay Kumar
LQ Newbie
 
Registered: Jul 2008
Posts: 8

Rep: Reputation: 0
Listing threads: procps cross compile issue


Hi, I want to list the user space threads in ps output. The busybox ps command doesn't have the option to list the threads. So I am trying to cross compile procps and port ps onto the target board (OMAP L138 based eXp board with ARM core and Davinci code base). But it fails during compilation. Here is the command I run and few lines from the compile time errors.

procps-3.2.8# make CC=arm-none-linux-gnueabi-gcc CPPFLAGS= lib64=lib m64=

arm-none-linux-gnueabi-gcc -D_GNU_SOURCE -I proc -fno-common -ffast-math -W -Wall -Wshadow -Wcast-align -Wredundant-decls -Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -O2 -s -c -o top.o top.c
top.c:28:20: error: curses.h: No such file or directory
top.c:38:18: error: term.h: No such file or directory
top.c:72: error: 'COLOR_RED' undeclared here (not in a function)
top.c:72: error: 'COLOR_YELLOW' undeclared here (not in a function)
top.c:72: error: 'COLOR_CYAN' undeclared here (not in a function)
top.c:72: error: 'COLOR_WHITE' undeclared here (not in a function)
top.c:72: error: 'COLOR_MAGENTA' undeclared here (not in a function)
top.c:72: error: 'COLOR_BLUE' undeclared here (not in a function)
top.c:72: error: 'COLOR_GREEN' undeclared here (not in a function)
top.c:72: warning: missing initializer
top.c:72: warning: (near initialization for 'Rc.win')
top.c: In function 'tg2':
top.c:316: warning: implicit declaration of function 'tgoto'
top.c:316: error: 'cursor_address' undeclared (first use in this function)
top.c:316: error: (Each undeclared identifier is reported only once
top.c:316: error: for each function it appears in.)
top.c:316: warning: pointer/integer type mismatch in conditional expression

Here it fails while building top. so was I even trying to modify the Makefile to remove other binaries and keep only ps. But I am surprised I didn't see any reference to ps in the list of targets.
As expected I see the threads under /proc. Is an alternative to list threads in an embedded Linux environment?
 
Old 12-17-2011, 12:33 AM   #2
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
You should specify ncurses library include path in your CFLAGS and the libs in LDFLAGS.
 
1 members found this post helpful.
Old 12-19-2011, 10:29 AM   #3
Ajay Kumar
LQ Newbie
 
Registered: Jul 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks cnxsoft. It worked after the changes you have suggested.
I searched for the include path for 'curses.h' in the IDE for the target and also found the library path there. Thanks again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross compile GDB issue kotao_78 Programming 3 05-19-2013 09:35 PM
Listing Java threads BusyBeeBop Linux - Software 0 02-26-2008 05:21 AM
Qt Cross Compile werewolfolondon Linux - Software 2 02-25-2005 01:01 PM
cross compile zaicheke Linux - Software 7 01-20-2005 08:23 PM
Checkboxes in the Subscribed Threads listing Bebo LQ Suggestions & Feedback 2 07-21-2004 09:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration