pkg-config-0.23 make 시 warning 인데
뭐 때문에 그런지 모르겠네요…
warning은 그냥 무시해도 될까요?
libtool: link: warning: -version-info/-version-number' is ignored for convenience libraries libtool: link: warning:
-release’ is ignored for convenience libraries
testglib.c: In function g_node_test': testglib.c:86: warning: reading through null pointer (arg 5) testglib.c:90: warning: reading through null pointer (arg 5) testglib.c:98: warning: reading through null pointer (arg 5) testglib.c:108: warning: reading through null pointer (arg 5) testglib.c:109: warning: reading through null pointer (arg 5) testglib.c:110: warning: reading through null pointer (arg 5) testglib.c:111: warning: reading through null pointer (arg 5) testglib.c:112: warning: reading through null pointer (arg 5) testglib.c:113: warning: reading through null pointer (arg 5) testglib.c:114: warning: reading through null pointer (arg 5) testglib.c:115: warning: reading through null pointer (arg 5) testglib.c:116: warning: reading through null pointer (arg 5) testglib.c:117: warning: reading through null pointer (arg 5) testglib.c:118: warning: reading through null pointer (arg 5) testglib.c:123: warning: reading through null pointer (arg 5) testglib.c:127: warning: reading through null pointer (arg 5) testglib.c:182: warning: reading through null pointer (arg 5) testglib.c:183: warning: reading through null pointer (arg 5) testglib.c: In function
main’:
testglib.c:359: warning: reading through null pointer (arg 5)
testglib.c:361: warning: reading through null pointer (arg 5)
testglib.c:363: warning: reading through null pointer (arg 5)
testglib.c:366: warning: reading through null pointer (arg 5)
testglib.c:912: warning: const qualifier ignored on asm
testglib.c:913: warning: const qualifier ignored on asm
testglib.c:915: warning: const qualifier ignored on asm
testglib.c:915: warning: const qualifier ignored on asm
libtool: link: warning: -version-info/-version-number' is ignored for convenience libraries libtool: link: warning:
-release’ is ignored for convenience libraries
libtool: link: warning: -version-info/-version-number' is ignored for convenience libraries libtool: link: warning:
-release’ is ignored for convenience libraries
In file included from testgthread.c:6:
…/testglib.c: In function g_node_test': ../testglib.c:86: warning: reading through null pointer (arg 5) ../testglib.c:90: warning: reading through null pointer (arg 5) ../testglib.c:98: warning: reading through null pointer (arg 5) ../testglib.c:108: warning: reading through null pointer (arg 5) ../testglib.c:109: warning: reading through null pointer (arg 5) ../testglib.c:110: warning: reading through null pointer (arg 5) ../testglib.c:111: warning: reading through null pointer (arg 5) ../testglib.c:112: warning: reading through null pointer (arg 5) ../testglib.c:113: warning: reading through null pointer (arg 5) ../testglib.c:114: warning: reading through null pointer (arg 5) ../testglib.c:115: warning: reading through null pointer (arg 5) ../testglib.c:116: warning: reading through null pointer (arg 5) ../testglib.c:117: warning: reading through null pointer (arg 5) ../testglib.c:118: warning: reading through null pointer (arg 5) ../testglib.c:123: warning: reading through null pointer (arg 5) ../testglib.c:127: warning: reading through null pointer (arg 5) ../testglib.c:182: warning: reading through null pointer (arg 5) ../testglib.c:183: warning: reading through null pointer (arg 5) ../testglib.c: In function
testglib_main’:
…/testglib.c:359: warning: reading through null pointer (arg 5)
…/testglib.c:361: warning: reading through null pointer (arg 5)
…/testglib.c:363: warning: reading through null pointer (arg 5)
…/testglib.c:366: warning: reading through null pointer (arg 5)
…/testglib.c:912: warning: const qualifier ignored on asm
…/testglib.c:913: warning: const qualifier ignored on asm
…/testglib.c:915: warning: const qualifier ignored on asm
…/testglib.c:915: warning: const qualifier ignored on asm
hash-test.c:181: warning: ‘not_even_foreach’ defined but not used
hash-test.c:206: warning: ‘remove_even_foreach’ defined but not used
node-test.c: In function g_node_test': node-test.c:99: warning: reading through null pointer (arg 5) node-test.c:103: warning: reading through null pointer (arg 5) node-test.c:111: warning: reading through null pointer (arg 5) node-test.c:121: warning: reading through null pointer (arg 5) node-test.c:122: warning: reading through null pointer (arg 5) node-test.c:123: warning: reading through null pointer (arg 5) node-test.c:124: warning: reading through null pointer (arg 5) node-test.c:125: warning: reading through null pointer (arg 5) node-test.c:126: warning: reading through null pointer (arg 5) node-test.c:127: warning: reading through null pointer (arg 5) node-test.c:128: warning: reading through null pointer (arg 5) node-test.c:129: warning: reading through null pointer (arg 5) node-test.c:130: warning: reading through null pointer (arg 5) node-test.c:131: warning: reading through null pointer (arg 5) node-test.c:136: warning: reading through null pointer (arg 5) node-test.c:140: warning: reading through null pointer (arg 5) node-test.c:195: warning: reading through null pointer (arg 5) node-test.c:196: warning: reading through null pointer (arg 5) type-test.c: In function
main’:
type-test.c:54: warning: const qualifier ignored on asm
type-test.c:55: warning: const qualifier ignored on asm
type-test.c:57: warning: const qualifier ignored on asm
type-test.c:57: warning: const qualifier ignored on asm
pkg.c: In function get_multi_merged': pkg.c:1015: warning: unused variable
tmp’
pkg.c: In function get_multi_merged_from_back': pkg.c:1037: warning: unused variable
tmp’
pkg.c: At top level:
pkg.c:259: warning: ‘file_readable’ defined but not used
pkg.c:587: warning: ‘spew_string_list’ defined but not used
pkg.c:714: warning: ‘compare_req_version_names’ defined but not used
pkg.c:723: warning: ‘compare_package_keys’ defined but not used
parse.c: In function parse_conflicts': parse.c:619: warning: unused variable
parsed’
parse.c:620: warning: unused variable iter' main.c: In function
main’:
main.c:201: warning: unused variable pkglibdir' main.c:202: warning: unused variable
search_dirs’
main.c:203: warning: unused variable iter' main.c:207: warning: unused variable
pkg’
저는 아주 잘 됩니다만… ;;
configure를 하셨을거고… 하지 않았다면… Makefile 자체가 없을테니…
make를 하면…
…
…
…
읽다보니… warning 문구만 적으놓으신 거군요… ;;
근데… 설치가 안되는 겁니까?
지금 질문과 내용을 다시 읽으면서… 헷갈리는 중입니다.
제가 임의적으로 님의 글을 해석하자면…
make시 warning 가 안 뜨면 좋겠지만, 프로그램이 방대해지면서
이런 부분이 등장하고는 합니다.
일단 pkg-config의 용도상 warning 는 무시하셔도 될 것 같습니다.
하여튼… 현재 우분투에는 0.22가 최신 버전이며, 0.23을 소스로 설치해본 결과 잘 됩니다.
저는 make시…
[code:mmy1m5l7]make all-recursive
make[1]: Entering directory /home/shriekout/바탕화면/pkg-config-0.23' Making all in glib-1.2.10 make[2]: Entering directory
/home/shriekout/바탕화면/pkg-config-0.23/glib-1.2.10’
CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=glibconfig.h ./config.status
config.status: executing depfiles commands
config.status: executing default-1 commands
creating glibconfig.h
glibconfig.h is unchanged
config.status: executing default commands
echo timestamp > stamp-gc-h
make all-recursive
make[3]: Entering directory /home/shriekout/바탕화면/pkg-config-0.23/glib-1.2.10' Making all in . make[4]: Entering directory
/home/shriekout/바탕화면/pkg-config-0.23/glib-1.2.10’
if /bin/bash ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -DG_LOG_DOMAIN=g_log_domain_glib -g -O2 -Wall -D_REENTRANT -MT garray.lo -MD -MP -MF ".deps/garray.Tpo"
-c -o garray.lo test -f 'garray.c' || echo './'
garray.c;
then mv -f ".deps/garray.Tpo" ".deps/garray.Plo";
else rm -f ".deps/garray.Tpo"; exit 1;
fi
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I. -I. -DG_LOG_DOMAIN=g_log_domain_glib -g -O2 -Wall -D_REENTRANT -MT garray.lo -MD -MP -MF .deps/garray.Tpo -c garray.c -fPIC -DPIC -o .libs/garray.o
gcc -DHAVE_CONFIG_H -I. -I. -I. -DG_LOG_DOMAIN=g_log_domain_glib -g -O2 -Wall -D_REENTRANT -MT garray.lo -MD -MP -MF .deps/garray.Tpo -c garray.c -o garray.o >/dev/null 2>&1
if /bin/bash ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -DG_LOG_DOMAIN=g_log_domain_glib -g -O2 -Wall -D_REENTRANT -MT gcache.lo -MD -MP -MF ".deps/gcache.Tpo"
-c -o gcache.lo test -f 'gcache.c' || echo './'
gcache.c;
then mv -f ".deps/gcache.Tpo" ".deps/gcache.Plo";
else rm -f ".deps/gcache.Tpo"; exit 1;
fi
... 중간생략 ...
/bin/bash ./libtool --mode=link gcc -g -Wall -O2 -g -O2 -o pkg-config pkg.o partial-glib.o parse.o main.o findme.o popt.o poptconfig.o popthelp.o poptparse.o glib-1.2.10/libglib.la
mkdir .libs
gcc -g -Wall -O2 -g -O2 -o pkg-config pkg.o partial-glib.o parse.o main.o findme.o popt.o poptconfig.o popthelp.o poptparse.o glib-1.2.10/.libs/libglib.a
make[2]: Leaving directory /home/shriekout/바탕화면/pkg-config-0.23' make[1]: Leaving directory
/home/shriekout/바탕화면/pkg-config-0.23’[/code:mmy1m5l7]
잘 됩니다.
초짜 주제에 한 번 컴파일 해봤습니다.
건투를 빕니다.
참… 제가 잘은 모르지만… 가령…
[code:mmy1m5l7]hash-test.c:181: warning: ‘not_even_foreach’ defined but not used[/code:mmy1m5l7]
같은 warning 같은 경우… ‘not_even_foreach 가 선언되었지만 사용되지 않았다’ 라는 의미이고…
예를 들자면 int i; 라고 i라는 변수를 사용하겠다고 선언했지만, 프로그램 어디에서도 i라는 변수가 사용되지 않을 경우 발생되는 경고입니다.
i는 그야말로 int의 자료크기만큼 메모리만 떡하니 잡아먹고 있겠지만, 프로그램 실행상에는 전혀 문제가 없기 때문에 그냥 경고정도를 하는걸로 알고 있습니다.
물론 모든 경고가 그냥 경고로 끝나지 않겠지만, pkg-config 같은 경우 무시하셔도 될 것 같습니다.
user1
(강분도)
1월 6, 2010, 7:28오전
3
[quote="lubnaldo":3lhnj37y]pkg-config-0.23 make 시 warning 인데
뭐 때문에 그런지 모르겠네요…
warning은 그냥 무시해도 될까요?
[/quote:3lhnj37y] 네 무시해도 됩니다.
에러가 문제지요
줄 수 짧은 단순 프로그램 아닌 이상 warning없이 컴파일 되는 패키지는 거의 없습니다.
분도님 말씀대로 경고 메시지는 크게 걱정안하셔도 될듯 보입니다.
흔히 나오는 경고 메시지 들에는 다은과 같은 것이 있죠.
ignoring return value of ( 함수 리턴값 체킹안하는 것)
defined but not used (변수 선언은 해놓고 쓰지 않는것)
위와같은 경고는 다들 쉽게 무시합니다.
그런데 pkg-config-0.23 make 하시면서 양도 그 중 가장 많고 신경 쓰이는 warning이
warning: reading through null pointer (arg 5) ( printf format 인수중 널포인터에서 읽는것)
이셨을 거 같습니다.
이 경고 메시지는 사실 pkg-config 내에 포함된 glib 소스에서의 문제로
pkg-config 0.22 내의 glib-1.2.8
pkg-config 0.23 내의 glib-1.2.10
에서 똑같이 발생합니다.
널포인터 경고 가 정 걱정되시면
다음의 패치를 적용하세요
[code:4csu6apx]diff -ur pkg-config-0.23/glib-1.2.10.orig/testgdate.c pkg-config-0.23/glib-1.2.10/testgdate.c
— pkg-config-0.23/glib-1.2.10.orig/testgdate.c 2000-05-19 08:43:50.000000000 +0200
+++ pkg-config-0.23/glib-1.2.10/testgdate.c 2007-12-12 12:57:37.000000000 +0100
@@ -16,7 +16,7 @@
if (!m)
g_print ("\n(%s:%d) failed for: %s\n", FILE , LINE , ( # cond ));
else \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), m ? (gchar*)m : ""); \
}
else
++passed;
diff -ur pkg-config-0.23/glib-1.2.10.orig/testglib.c pkg-config-0.23/glib-1.2.10/testglib.c
— pkg-config-0.23/glib-1.2.10.orig/testglib.c 1999-07-17 11:48:46.000000000 +0200
+++ pkg-config-0.23/glib-1.2.10/testglib.c 2007-12-12 12:57:37.000000000 +0100
@@ -38,7 +38,7 @@
{ if (!m)
g_print ("\n(%s:%d) failed for: %s\n", FILE , LINE , ( # cond ));
else \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), m ? (gchar*)m : ""); \
}
else
g_print ("."); fflush (stdout);
diff -ur pkg-config-0.23/glib-1.2.10.orig/tests/array-test.c pkg-config-0.23/glib-1.2.10/tests/array-test.c
— pkg-config-0.23/glib-1.2.10.orig/tests/array-test.c 1999-02-24 07:14:16.000000000 +0100
+++ pkg-config-0.23/glib-1.2.10/tests/array-test.c 2007-12-12 12:57:37.000000000 +0100
@@ -38,7 +38,7 @@
{ if (!m)
g_print ("\n(%s:%d) failed for: %s\n", FILE , LINE , ( # cond ));
else \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), m ? (gchar*)m : ""); \
}
else
g_print ("."); fflush (stdout);
diff -ur pkg-config-0.23/glib-1.2.10.orig/tests/dirname-test.c pkg-config-0.23/glib-1.2.10/tests/dirname-test.c
— pkg-config-0.23/glib-1.2.10.orig/tests/dirname-test.c 1999-02-24 07:14:18.000000000 +0100
+++ pkg-config-0.23/glib-1.2.10/tests/dirname-test.c 2007-12-12 12:57:37.000000000 +0100
@@ -38,7 +38,7 @@
{ if (!m)
g_print ("\n(%s:%d) failed for: %s\n", FILE , LINE , ( # cond ));
else \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), m ? (gchar*)m : ""); \
}
else
g_print ("."); fflush (stdout);
diff -ur pkg-config-0.23/glib-1.2.10.orig/tests/list-test.c pkg-config-0.23/glib-1.2.10/tests/list-test.c
— pkg-config-0.23/glib-1.2.10.orig/tests/list-test.c 1999-02-24 07:14:20.000000000 +0100
+++ pkg-config-0.23/glib-1.2.10/tests/list-test.c 2007-12-12 12:57:37.000000000 +0100
@@ -38,7 +38,7 @@
{ if (!m)
g_print ("\n(%s:%d) failed for: %s\n", FILE , LINE , ( # cond ));
else \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), m ? (gchar*)m : ""); \
}
else
g_print ("."); fflush (stdout);
diff -ur pkg-config-0.23/glib-1.2.10.orig/tests/node-test.c pkg-config-0.23/glib-1.2.10/tests/node-test.c
— pkg-config-0.23/glib-1.2.10.orig/tests/node-test.c 1999-07-17 11:48:51.000000000 +0200
+++ pkg-config-0.23/glib-1.2.10/tests/node-test.c 2007-12-12 12:57:37.000000000 +0100
@@ -48,7 +48,7 @@
{ if (!m)
g_print ("\n(%s:%d) failed for: %s\n", FILE , LINE , ( # cond ));
else \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), m ? (gchar*)m : ""); \
exit(1); \
}
} G_STMT_END
diff -ur pkg-config-0.23/glib-1.2.10.orig/tests/relation-test.c pkg-config-0.23/glib-1.2.10/tests/relation-test.c
— pkg-config-0.23/glib-1.2.10.orig/tests/relation-test.c 1999-02-24 07:14:22.000000000 +0100
+++ pkg-config-0.23/glib-1.2.10/tests/relation-test.c 2007-12-12 12:57:37.000000000 +0100
@@ -38,7 +38,7 @@
{ if (!m)
g_print ("\n(%s:%d) failed for: %s\n", FILE , LINE , ( # cond ));
else \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), m ? (gchar*)m : ""); \
}
else
g_print ("."); fflush (stdout);
diff -ur pkg-config-0.23/glib-1.2.10.orig/tests/slist-test.c pkg-config-0.23/glib-1.2.10/tests/slist-test.c
— pkg-config-0.23/glib-1.2.10.orig/tests/slist-test.c 1999-02-24 07:14:23.000000000 +0100
+++ pkg-config-0.23/glib-1.2.10/tests/slist-test.c 2007-12-12 12:57:37.000000000 +0100
@@ -38,7 +38,7 @@
{ if (!m)
g_print ("\n(%s:%d) failed for: %s\n", FILE , LINE , ( # cond ));
else \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), m ? (gchar*)m : ""); \
}
else
g_print ("."); fflush (stdout);
diff -ur pkg-config-0.23/glib-1.2.10.orig/tests/strfunc-test.c pkg-config-0.23/glib-1.2.10/tests/strfunc-test.c
— pkg-config-0.23/glib-1.2.10.orig/tests/strfunc-test.c 1999-02-24 07:14:24.000000000 +0100
+++ pkg-config-0.23/glib-1.2.10/tests/strfunc-test.c 2007-12-12 12:57:37.000000000 +0100
@@ -38,7 +38,7 @@
{ if (!m)
g_print ("\n(%s:%d) failed for: %s\n", FILE , LINE , ( # cond ));
else \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), m ? (gchar*)m : ""); \
}
else
g_print ("."); fflush (stdout);
diff -ur pkg-config-0.23/glib-1.2.10.orig/tests/string-test.c pkg-config-0.23/glib-1.2.10/tests/string-test.c
— pkg-config-0.23/glib-1.2.10.orig/tests/string-test.c 1999-07-17 11:48:51.000000000 +0200
+++ pkg-config-0.23/glib-1.2.10/tests/string-test.c 2007-12-12 12:57:37.000000000 +0100
@@ -38,7 +38,7 @@
{ if (!m)
g_print ("\n(%s:%d) failed for: %s\n", FILE , LINE , ( # cond ));
else \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), m ? (gchar*)m : ""); \
}
else
g_print ("."); fflush (stdout);
diff -ur pkg-config-0.23/glib-1.2.10.orig/tests/tree-test.c pkg-config-0.23/glib-1.2.10/tests/tree-test.c
— pkg-config-0.23/glib-1.2.10.orig/tests/tree-test.c 1999-02-24 07:14:26.000000000 +0100
+++ pkg-config-0.23/glib-1.2.10/tests/tree-test.c 2007-12-12 12:57:37.000000000 +0100
@@ -38,7 +38,7 @@
{ if (!m)
g_print ("\n(%s:%d) failed for: %s\n", FILE , LINE , ( # cond ));
else \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), m ? (gchar*)m : ""); \
}
else
g_print ("."); fflush (stdout); [/code:4csu6apx]
답변 감사합니다~!
제가 리눅스를 처음 써보는거라…
아직 모르는게 많습니다…
대부분이 warning는 있군요…^^;
warning은 무시하고 그냥 했습니다ㅋ