Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#9155 - Undefined references to two libalpm functions

Attached to Project: Pacman
Opened by Darwin Bautista (djclue917) - Friday, 11 January 2008, 14:29 GMT
Last edited by Dan McGee (toofishes) - Saturday, 12 January 2008, 16:42 GMT
Task Type Bug Report
Category Backend/Core
Status Closed
Assigned To Dan McGee (toofishes)
Architecture All
Severity Medium
Priority Normal
Reported Version 3.1.0
Due in Version 3.1.1
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
I get undefined references when using alpm_option_set_ignoregrps and alpm_option_set_ignorepkgs. I discovered this after trying to import a libalpm Python extension (created using SWIG).

>>> import alpm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "alpm.py", line 7, in <module>
import _alpm
ImportError: /home/darwin/Projects/arch/pyalpm/pkg/usr/lib/python2.5/site-packages/_alpm.so: undefined symbol: alpm_option_set_ignorepkgs

When I set SWIG to ignore those two functions, _alpm.so loads fine.

I also created a dummy program that calls the two functions and I get this upon compilation:

darwin@excelsior:/tmp$ gcc test.c -lalpm
/tmp/cc85uUDg.o: In function `main':
test.c:(.text+0x18): undefined reference to `alpm_option_set_ignoregrps'
test.c:(.text+0x23): undefined reference to `alpm_option_set_ignorepkgs'
collect2: ld returned 1 exit status

BTW, I only need to link to libalpm right? Or am I missing something here?

Steps to Reproduce:

/* test.c */
#include <alpm.h>

int main()
{
alpm_list_t *a;
alpm_option_set_ignoregrps(a);
alpm_option_set_ignorepkgs(a);
return 0;
}

$ gcc test.c -lalpm
This task depends upon

Closed by  Dan McGee (toofishes)
Saturday, 12 January 2008, 16:42 GMT
Reason for closing:  Fixed
Additional comments about closing:  will be fixed in 3.1.1

http://projects.archlinux.org/git/?p=pac man.git;a=commit;h=f9a7d8cba4ec1833d32dc 8a9403053564b68d18a
Comment by Darwin Bautista (djclue917) - Friday, 11 January 2008, 14:30 GMT
BTW, this is in i686 (sorry I forgot to specify the arch).
Comment by Dan McGee (toofishes) - Friday, 11 January 2008, 14:39 GMT
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Due in Version (Undecided → 3.1.1)
  • Task assigned to Dan McGee (toofishes)
You've found the two functions we failed to put SYMEXPORT on. Doh!

We can fix this in 3.1.1 since it doesn't change the existing library interface, only adds new symbols.

Loading...