This unacceptable change in the linker has the potential to break many 
packages.   Especially when:
cc=gcc $(include) $(libs) 
prog1: prog1.c

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libxml2 in Ubuntu.
https://bugs.launchpad.net/bugs/1032639

Title:
  can not link against libxml2

Status in “libxml2” package in Ubuntu:
  Invalid

Bug description:
  When I try tolink against libxml2 I get undefined symbol errors from
  libxml2. Installed packages are: libxml2 libxml2-dev

  I try to build the tutorial file from libxml2:
  http://www.xmlsoft.org/tutorial/apc.html

  I try to build the programm like this:

  gcc -o main $(xml2-config --cflags --libs) main.o

  on other platforms (debian testing or ubuntu 10.04) this works
  flawlessly.

  the complete output:
  $ gcc -o main $(xml2-config --cflags --libs) main.o
  main.o: In function `parseStory':
  main.c:(.text+0x2f): undefined reference to `xmlStrcmp'
  main.c:(.text+0x4f): undefined reference to `xmlNodeListGetString'
  main.c:(.text+0x73): undefined reference to `xmlFree'
  main.o: In function `parseDoc':
  main.c:(.text+0xa9): undefined reference to `xmlParseFile'
  main.c:(.text+0xe9): undefined reference to `xmlDocGetRootElement'
  main.c:(.text+0x124): undefined reference to `xmlFreeDoc'
  main.c:(.text+0x13e): undefined reference to `xmlStrcmp'
  main.c:(.text+0x172): undefined reference to `xmlFreeDoc'
  main.c:(.text+0x197): undefined reference to `xmlStrcmp'
  main.c:(.text+0x1cd): undefined reference to `xmlFreeDoc'
  collect2: ld returned 1 exit status

  
  $ xml2-config --cflags
  -I/usr/include/libxml2

  xml2-config --libs
  -L/usr/lib/x86_64-linux-gnu -lxml2

  $ ls -l /usr/lib/x86_64-linux-gnu/libxml2.*
  -rw-r--r-- 1 root root 2187982 May 18 21:52 
/usr/lib/x86_64-linux-gnu/libxml2.a
  -rw-r--r-- 1 root root     947 May 18 21:52 
/usr/lib/x86_64-linux-gnu/libxml2.la
  lrwxrwxrwx 1 root root      16 May 18 21:52 
/usr/lib/x86_64-linux-gnu/libxml2.so -> libxml2.so.2.7.8
  lrwxrwxrwx 1 root root      16 May 18 21:52 
/usr/lib/x86_64-linux-gnu/libxml2.so.2 -> libxml2.so.2.7.8
  -rw-r--r-- 1 root root 1417368 May 18 21:52 
/usr/lib/x86_64-linux-gnu/libxml2.so.2.7.8

  $ nm -D /usr/lib/x86_64-linux-gnu/libxml2.so |grep -e xmlStrcmp -e 
xmlNodeListGetString -e 'xmlFree$' -e xmlParseFile -e xmlDocGetRootElement -e 
'xmlFreeDoc$'
  0000000000054bd0 T xmlDocGetRootElement
  0000000000358a08 D xmlFree
  00000000000537e0 T xmlFreeDoc
  0000000000051d50 T xmlNodeListGetString
  000000000004e370 T xmlParseFile
  00000000000aa9b0 T xmlStrcmp

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libxml2/+bug/1032639/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to