Build issue on ubuntu
Closed this issue · 6 comments
antono commented
/usr/bin/make
peg-0.1.4/leg -o markdown_parser.c markdown_parser.leg rule 'Notes' defined but not used rule 'NonAlphanumeric' defined but not used rule 'References' defined but not used cc -c `pkg-config --cflags glib-2.0` -Wall -O3 -ansi -o markdown_parser.o markdown_parser.c markdown_parser.c: In function ‘yy_SourceContents’: markdown_parser.c:1948:3: warning: label ‘l172’ defined but not used markdown_parser.c: At top level: markdown_parser.c:1507:14: warning: ‘yy_NonAlphanumeric’ defined but not used cc `pkg-config --cflags glib-2.0` `pkg-config --libs glib-2.0` -Wall -O3 -ansi -o markdown markdown_parser.o markdown_output.o markdown_lib.o markdown.c markdown_parser.o: In function `mk_str_from_list': markdown_parser.c:(.text+0x11946): undefined reference to `g_string_new' markdown_parser.c:(.text+0x11968): undefined reference to `g_string_append' markdown_parser.c:(.text+0x11a10): undefined reference to `g_string_new' markdown_parser.c:(.text+0x11a2a): undefined reference to `g_string_append' markdown_parser.c:(.text+0x11a61): undefined reference to `g_string_free' markdown_output.o: In function `print_latex_string': markdown_output.c:(.text+0x67): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x8c): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0xa4): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0xbc): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0xd4): undefined reference to `g_string_append_printf' markdown_output.o:markdown_output.c:(.text+0xec): more undefined references to `g_string_append_printf' follow markdown_output.o: In function `print_latex_string': markdown_output.c:(.text+0x12b): undefined reference to `g_string_insert_c' markdown_output.o: In function `print_html_string': markdown_output.c:(.text+0x18a): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x1b7): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x1dc): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x1f4): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x20c): undefined reference to `g_string_append_printf' markdown_output.o:markdown_output.c:(.text+0x253): more undefined references to `g_string_append_printf' follow markdown_output.o: In function `print_html_string': markdown_output.c:(.text+0x273): undefined reference to `g_string_insert_c' markdown_output.o: In function `print_html_element': markdown_output.c:(.text+0x2dc): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x303): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x339): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x354): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x374): undefined reference to `g_string_append_printf' markdown_output.o:markdown_output.c:(.text+0x384): more undefined references to `g_string_append_printf' follow markdown_output.o: In function `print_html_element': markdown_output.c:(.text+0x4b8): undefined reference to `g_slist_prepend' markdown_output.c:(.text+0x4ea): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x51e): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x53e): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x57e): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x5a5): undefined reference to `g_string_append_printf' markdown_output.o:markdown_output.c:(.text+0x5e6): more undefined references to `g_string_append_printf' follow markdown_output.o: In function `print_groff_mm_element': markdown_output.c:(.text+0x2123): undefined reference to `g_string_insert_c' markdown_output.c:(.text+0x2143): undefined reference to `g_string_insert_c' markdown_output.c:(.text+0x2163): undefined reference to `g_string_insert_c' markdown_output.c:(.text+0x217c): undefined reference to `g_string_append_printf' markdown_output.o: In function `print_element_list': markdown_output.c:(.text+0x228e): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x22b4): undefined reference to `g_slist_reverse' markdown_output.c:(.text+0x22c6): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x230e): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x2335): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x2375): undefined reference to `g_string_append_printf' markdown_output.c:(.text+0x239e): undefined reference to `g_string_append_printf' markdown_output.o:markdown_output.c:(.text+0x23be): more undefined references to `g_string_append_printf' follow markdown_output.o: In function `print_element_list': markdown_output.c:(.text+0x2422): undefined reference to `g_slist_free' markdown_lib.o: In function `markdown_to_g_string': markdown_lib.c:(.text+0x119): undefined reference to `g_string_new' markdown_lib.c:(.text+0x128): undefined reference to `g_string_new' markdown_lib.c:(.text+0x191): undefined reference to `g_string_append' markdown_lib.c:(.text+0x1f3): undefined reference to `g_string_free' markdown_lib.c:(.text+0x2a6): undefined reference to `g_string_insert_c' markdown_lib.c:(.text+0x2c3): undefined reference to `g_string_insert_c' markdown_lib.c:(.text+0x2e4): undefined reference to `g_string_insert_c' markdown_lib.o: In function `markdown_to_string': markdown_lib.c:(.text+0x31e): undefined reference to `g_string_free' /tmp/ccqmX6du.o: In function `main': markdown.c:(.text+0x55): undefined reference to `g_option_context_new' markdown.c:(.text+0x6f): undefined reference to `g_option_context_add_main_entries' markdown.c:(.text+0x9b): undefined reference to `g_option_group_new' markdown.c:(.text+0xad): undefined reference to `g_option_group_add_entries' markdown.c:(.text+0xb9): undefined reference to `g_option_context_add_group' markdown.c:(.text+0xc9): undefined reference to `g_option_context_set_description' markdown.c:(.text+0xe7): undefined reference to `g_option_context_parse' markdown.c:(.text+0xf7): undefined reference to `g_option_context_free' markdown.c:(.text+0x282): undefined reference to `g_string_new' markdown.c:(.text+0x37b): undefined reference to `g_string_free' markdown.c:(.text+0x415): undefined reference to `g_string_insert_c' markdown.c:(.text+0x45d): undefined reference to `g_string_insert_c' markdown.c:(.text+0x550): undefined reference to `g_print' collect2: ld returned 1 exit status make: *** [markdown] Error 1
jgm commented
You need to install glib:
apt-get install libglib2.0-dev
antono commented
It's already installed and compile other programs against it.
apt-cache policy libglib2.0-dev libglib2.0-dev: Installed: 2.27.93-0ubuntu1 Candidate: 2.27.93-0ubuntu1 Version table: *** 2.27.93-0ubuntu1 0 500 http://by.archive.ubuntu.com/ubuntu/ natty/main i386 Packages 100 /var/lib/dpkg/statuspkg-config --cflags glib-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/includels -lah /usr/include/glib-2.0/glib.h -rw-r--r-- 1 root root 2.9K 2011-01-31 17:58 /usr/include/glib-2.0/glib.h
antono commented
Hmm... Just fixed it with CC=gcc-4.4 make
4.5 is default for Ubuntu Natty. Bug is 100% reproducible with gcc 4.5.
jgm commented
Hm, maybe the output of 'pkg-config' is not right for gcc 4.5?
antono commented
I think pkg-config is ok. I build my own Glib/gtk programm with 4.5 and it seems work :)
jgm commented
Could this be related?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43750