All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] tools/thermal: tmon: fix compilation errors when building statically
  2014-06-02 17:08 [PATCH] tools/thermal: tmon: fix compilation errors when building statically Javi Merino
@ 2014-06-02 11:54 ` Jacob Pan
  2014-06-10 15:16   ` Javi Merino
  0 siblings, 1 reply; 4+ messages in thread
From: Jacob Pan @ 2014-06-02 11:54 UTC (permalink / raw)
  To: Javi Merino; +Cc: linux-kernel, linux-pm, Zhang Rui

On Mon,  2 Jun 2014 18:08:17 +0100
"Javi Merino" <javi.merino@arm.com> wrote:

> tmon fails to build statically with the following error:
> 
> $ make LDFLAGS=-static
> gcc -O1 -Wall -Wshadow -W -Wformat -Wimplicit-function-declaration
> -Wimplicit-int -fstack-protector -D VERSION=\"1.0\" -static tmon.o
> tui.o sysfs.o pid.o   -o tmon -lm -lpanel -lncursesw  -lpthread
> tmon.o: In function `tmon_sig_handler': tmon.c:(.text+0x21):
> undefined reference to `stdscr' tmon.o: In function `tmon_cleanup':
> tmon.c:(.text+0xb9): undefined reference to `stdscr'
> tmon.c:(.text+0x11e): undefined reference to `stdscr'
> tmon.c:(.text+0x123): undefined reference to `keypad'
> tmon.c:(.text+0x12d): undefined reference to `nocbreak' tmon.o: In
> function `main': tmon.c:(.text+0x785): undefined reference to `stdscr'
> tmon.c:(.text+0x78a): undefined reference to `nodelay'
> tui.o: In function `setup_windows':
> tui.c:(.text+0x131): undefined reference to `stdscr'
> tui.c:(.text+0x176): undefined reference to `stdscr'
> tui.c:(.text+0x19f): undefined reference to `stdscr'
> tui.c:(.text+0x1cc): undefined reference to `stdscr'
> tui.c:(.text+0x1ff): undefined reference to `stdscr'
> tui.o:tui.c:(.text+0x229): more undefined references to `stdscr'
> follow tui.o: In function `show_cooling_device':
> [...]
> 
> stdscr() and friends are in libtinfo (part of ncurses) so add it to
> the libraries that are linked in when compiling tmon to fix it.
> 
Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>

Thanks,

Jacob
> Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Signed-off-by: Javi Merino <javi.merino@arm.com>
> ---
>  tools/thermal/tmon/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
> index 447321104ec0..e775adcbd29f 100644
> --- a/tools/thermal/tmon/Makefile
> +++ b/tools/thermal/tmon/Makefile
> @@ -21,7 +21,7 @@ OBJS = tmon.o tui.o sysfs.o pid.o
>  OBJS +=
>  
>  tmon: $(OBJS) Makefile tmon.h
> -	$(CC) ${CFLAGS} $(LDFLAGS) $(OBJS)  -o $(TARGET) -lm -lpanel
> -lncursesw  -lpthread
> +	$(CC) ${CFLAGS} $(LDFLAGS) $(OBJS)  -o $(TARGET) -lm -lpanel
> -lncursesw -ltinfo -lpthread 
>  valgrind: tmon
>  	 sudo valgrind -v --track-origins=yes --tool=memcheck
> --leak-check=yes --show-reachable=yes --num-callers=20
> --track-fds=yes ./$(TARGET)  1> /dev/null

[Jacob Pan]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] tools/thermal: tmon: fix compilation errors when building statically
@ 2014-06-02 17:08 Javi Merino
  2014-06-02 11:54 ` Jacob Pan
  0 siblings, 1 reply; 4+ messages in thread
From: Javi Merino @ 2014-06-02 17:08 UTC (permalink / raw)
  To: linux-kernel, linux-pm; +Cc: Javi Merino, Jacob Pan, Zhang Rui

tmon fails to build statically with the following error:

$ make LDFLAGS=-static
gcc -O1 -Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int -fstack-protector -D VERSION=\"1.0\" -static tmon.o tui.o sysfs.o pid.o   -o tmon -lm -lpanel -lncursesw  -lpthread
tmon.o: In function `tmon_sig_handler':
tmon.c:(.text+0x21): undefined reference to `stdscr'
tmon.o: In function `tmon_cleanup':
tmon.c:(.text+0xb9): undefined reference to `stdscr'
tmon.c:(.text+0x11e): undefined reference to `stdscr'
tmon.c:(.text+0x123): undefined reference to `keypad'
tmon.c:(.text+0x12d): undefined reference to `nocbreak'
tmon.o: In function `main':
tmon.c:(.text+0x785): undefined reference to `stdscr'
tmon.c:(.text+0x78a): undefined reference to `nodelay'
tui.o: In function `setup_windows':
tui.c:(.text+0x131): undefined reference to `stdscr'
tui.c:(.text+0x176): undefined reference to `stdscr'
tui.c:(.text+0x19f): undefined reference to `stdscr'
tui.c:(.text+0x1cc): undefined reference to `stdscr'
tui.c:(.text+0x1ff): undefined reference to `stdscr'
tui.o:tui.c:(.text+0x229): more undefined references to `stdscr' follow
tui.o: In function `show_cooling_device':
[...]

stdscr() and friends are in libtinfo (part of ncurses) so add it to
the libraries that are linked in when compiling tmon to fix it.

Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
---
 tools/thermal/tmon/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
index 447321104ec0..e775adcbd29f 100644
--- a/tools/thermal/tmon/Makefile
+++ b/tools/thermal/tmon/Makefile
@@ -21,7 +21,7 @@ OBJS = tmon.o tui.o sysfs.o pid.o
 OBJS +=
 
 tmon: $(OBJS) Makefile tmon.h
-	$(CC) ${CFLAGS} $(LDFLAGS) $(OBJS)  -o $(TARGET) -lm -lpanel -lncursesw  -lpthread
+	$(CC) ${CFLAGS} $(LDFLAGS) $(OBJS)  -o $(TARGET) -lm -lpanel -lncursesw -ltinfo -lpthread
 
 valgrind: tmon
 	 sudo valgrind -v --track-origins=yes --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./$(TARGET)  1> /dev/null
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools/thermal: tmon: fix compilation errors when building statically
  2014-06-02 11:54 ` Jacob Pan
@ 2014-06-10 15:16   ` Javi Merino
  2014-07-01  1:56     ` Zhang Rui
  0 siblings, 1 reply; 4+ messages in thread
From: Javi Merino @ 2014-06-10 15:16 UTC (permalink / raw)
  To: Jacob Pan, Zhang Rui; +Cc: linux-kernel, linux-pm

Hi Rui,

On Mon, Jun 02, 2014 at 12:54:57PM +0100, Jacob Pan wrote:
> On Mon,  2 Jun 2014 18:08:17 +0100
> "Javi Merino" <javi.merino@arm.com> wrote:
> 
> > tmon fails to build statically with the following error:
> > 
> > $ make LDFLAGS=-static
> > gcc -O1 -Wall -Wshadow -W -Wformat -Wimplicit-function-declaration
> > -Wimplicit-int -fstack-protector -D VERSION=\"1.0\" -static tmon.o
> > tui.o sysfs.o pid.o   -o tmon -lm -lpanel -lncursesw  -lpthread
> > tmon.o: In function `tmon_sig_handler': tmon.c:(.text+0x21):
> > undefined reference to `stdscr' tmon.o: In function `tmon_cleanup':
> > tmon.c:(.text+0xb9): undefined reference to `stdscr'
> > tmon.c:(.text+0x11e): undefined reference to `stdscr'
> > tmon.c:(.text+0x123): undefined reference to `keypad'
> > tmon.c:(.text+0x12d): undefined reference to `nocbreak' tmon.o: In
> > function `main': tmon.c:(.text+0x785): undefined reference to `stdscr'
> > tmon.c:(.text+0x78a): undefined reference to `nodelay'
> > tui.o: In function `setup_windows':
> > tui.c:(.text+0x131): undefined reference to `stdscr'
> > tui.c:(.text+0x176): undefined reference to `stdscr'
> > tui.c:(.text+0x19f): undefined reference to `stdscr'
> > tui.c:(.text+0x1cc): undefined reference to `stdscr'
> > tui.c:(.text+0x1ff): undefined reference to `stdscr'
> > tui.o:tui.c:(.text+0x229): more undefined references to `stdscr'
> > follow tui.o: In function `show_cooling_device':
> > [...]
> > 
> > stdscr() and friends are in libtinfo (part of ncurses) so add it to
> > the libraries that are linked in when compiling tmon to fix it.
> > 
> Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>

Thanks!

Rui, can you pick this up?

Cheers,
Javi


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools/thermal: tmon: fix compilation errors when building statically
  2014-06-10 15:16   ` Javi Merino
@ 2014-07-01  1:56     ` Zhang Rui
  0 siblings, 0 replies; 4+ messages in thread
From: Zhang Rui @ 2014-07-01  1:56 UTC (permalink / raw)
  To: Javi Merino; +Cc: Jacob Pan, linux-kernel, linux-pm

On Tue, 2014-06-10 at 16:16 +0100, Javi Merino wrote:
> Hi Rui,
> 
> On Mon, Jun 02, 2014 at 12:54:57PM +0100, Jacob Pan wrote:
> > On Mon,  2 Jun 2014 18:08:17 +0100
> > "Javi Merino" <javi.merino@arm.com> wrote:
> > 
> > > tmon fails to build statically with the following error:
> > > 
> > > $ make LDFLAGS=-static
> > > gcc -O1 -Wall -Wshadow -W -Wformat -Wimplicit-function-declaration
> > > -Wimplicit-int -fstack-protector -D VERSION=\"1.0\" -static tmon.o
> > > tui.o sysfs.o pid.o   -o tmon -lm -lpanel -lncursesw  -lpthread
> > > tmon.o: In function `tmon_sig_handler': tmon.c:(.text+0x21):
> > > undefined reference to `stdscr' tmon.o: In function `tmon_cleanup':
> > > tmon.c:(.text+0xb9): undefined reference to `stdscr'
> > > tmon.c:(.text+0x11e): undefined reference to `stdscr'
> > > tmon.c:(.text+0x123): undefined reference to `keypad'
> > > tmon.c:(.text+0x12d): undefined reference to `nocbreak' tmon.o: In
> > > function `main': tmon.c:(.text+0x785): undefined reference to `stdscr'
> > > tmon.c:(.text+0x78a): undefined reference to `nodelay'
> > > tui.o: In function `setup_windows':
> > > tui.c:(.text+0x131): undefined reference to `stdscr'
> > > tui.c:(.text+0x176): undefined reference to `stdscr'
> > > tui.c:(.text+0x19f): undefined reference to `stdscr'
> > > tui.c:(.text+0x1cc): undefined reference to `stdscr'
> > > tui.c:(.text+0x1ff): undefined reference to `stdscr'
> > > tui.o:tui.c:(.text+0x229): more undefined references to `stdscr'
> > > follow tui.o: In function `show_cooling_device':
> > > [...]
> > > 
> > > stdscr() and friends are in libtinfo (part of ncurses) so add it to
> > > the libraries that are linked in when compiling tmon to fix it.
> > > 
> > Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
> 
> Thanks!
> 
> Rui, can you pick this up?

Done, thanks!

-rui
> 
> Cheers,
> Javi
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-01  1:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-02 17:08 [PATCH] tools/thermal: tmon: fix compilation errors when building statically Javi Merino
2014-06-02 11:54 ` Jacob Pan
2014-06-10 15:16   ` Javi Merino
2014-07-01  1:56     ` Zhang Rui

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.