FS#8456 - Pacman fails to build on os x.
Attached to Project:
Pacman
Opened by eliott (cactus) - Tuesday, 30 October 2007, 03:30 GMT
Last edited by Dan McGee (toofishes) - Friday, 06 June 2008, 04:46 GMT
Opened by eliott (cactus) - Tuesday, 30 October 2007, 03:30 GMT
Last edited by Dan McGee (toofishes) - Friday, 06 June 2008, 04:46 GMT
|
Details
Summary and Info:
Trying to build pacman on os x. Steps to Reproduce: Get an os X system (ha). Install macports. Install autoconf, automake, libarchive. Currently using Dan's freebsd branch. git clone http://code.toofishes.net/gitprojects/pacman.git cd pacman.git git checkout -b bsd origin/freebsd ./autogen.sh Edit lib/libalpm/handle.c - realroot = realpath(root, NULL); + realroot = strdup(root); /configure --enable-debug --disable-nls LDFLAGS='-L/opt/local/lib -L/usr/lib -L/usr/libexec' CFLAGS='-I/opt/local/include -I/usr/include' Attached output of configure, as well as make. |
This task depends upon
Closed by Dan McGee (toofishes)
Friday, 06 June 2008, 04:46 GMT
Reason for closing: Fixed
Additional comments about closing: Original bug report has been fixed
Friday, 06 June 2008, 04:46 GMT
Reason for closing: Fixed
Additional comments about closing: Original bug report has been fixed
configure-output.txt
Leaving the bug open for future issues, such as possible problems in "make check" and pactest usage.
However, due to the lack of fakeroot (not even in macports), I can't run any of the pactests.
Oddly, when I do 'pacman --help', I get the following output..
$ cd /Users/eliott/Projects/pacman/pacman/
$ ./src/pacman/pacman --help
usage: /Users/eliott/Projects/pacman/pacman/src/pacman/.libs/pacman <operation> [...]
options:
/Users/eliott/Projects/pacman/pacman/src/pacman/.libs/pacman {-h --help}
/Users/eliott/Projects/pacman/pacman/src/pacman/.libs/pacman {-V --version}
/Users/eliott/Projects/pacman/pacman/src/pacman/.libs/pacman {-A --add} [options] <file>
/Users/eliott/Projects/pacman/pacman/src/pacman/.libs/pacman {-F --freshen} [options] <file>
/Users/eliott/Projects/pacman/pacman/src/pacman/.libs/pacman {-Q --query} [options] [package]
/Users/eliott/Projects/pacman/pacman/src/pacman/.libs/pacman {-R --remove} [options] <package>
/Users/eliott/Projects/pacman/pacman/src/pacman/.libs/pacman {-S --sync} [options] [package]
/Users/eliott/Projects/pacman/pacman/src/pacman/.libs/pacman {-U --upgrade} [options] <file>
use '/Users/eliott/Projects/pacman/pacman/src/pacman/.libs/pacman --help' with other options for more syntax
Any idea why it is including the full path to the .libs/pacman binary?
That is what removing those basename calls does for you. Try the latest code off my freebsd branch.
I am thinking...mmmm... 8 years maybe?
Even then, I didn't do a huge amount of it.
Thanks for the lesson though Dan. ;)
The above seems to work on OS X (tiger).
Without fakeroot though, pactests can't be run. :(
I got pactests running with sudo (after talking with dan), and got the test results.
--------------------------------------------------------------------------------
[FAIL] fileconflict001 Rules: OK = 0 FAIL = 3 SKIP = 0
Fileconflict with symlinks
[FAIL] fileconflict002 Rules: OK = 0 FAIL = 3 SKIP = 0
Fileconflict with symlinks (2)
[FAIL] sync044 Rules: OK = 4 FAIL = 1 SKIP = 0
A dependency induces a replacement
[FAIL] sync1003 Rules: OK = 0 FAIL = 2 SKIP = 0
Induced removal would break dependency
[FAIL] sync1004 Rules: OK = 0 FAIL = 2 SKIP = 0
Induced removal would break dependency (2)
[FAIL] sync403 Rules: OK = 1 FAIL = 3 SKIP = 0
Choice between two providers (2)
[FAIL] upgrade051 Rules: OK = 0 FAIL = 3 SKIP = 0
Upgrade to a package that provides another package
--------------------------------------------------------------------------------
TOTAL = 138
PASS = 131 ( 94.93%)
FAIL = 7 ( 5.07%)
Apparently this is pretty inline with the arch test results.
That was being built with nls disabled, as dan mentioned.
I got it to compile just fine with the config standa I noted on nov 3rd.
Not having fakeroot sucks though.
fakeroot-ng might work, but I haven't tried it yet (still seems pretty newish).
Did you use MacPorts or something to install the libraries?
./configure --prefix=/usr/local LDFLAGS='-L/usr/local/lib -L/usr/lib -L/usr/libexec' CFLAGS='-I/usr/local/include -I/usr/include'
I don't have anything in /opt and I installed gettext to /usr/local. I'm not sure why it's not picking it up (I think that's the problem). It might be something to do with how I installed libfetch or libarchive though. I installed gettext after libarchive.
This is Leopard (10.5) btw.
It was a while ago though, so I don't fully remember what I did with it.
---
Making all in doc
make[2]: *** No rule to make target `pacman.8', needed by `all-am'. Stop.
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
---
The second problem appears to be with enabling debugging. This seems to be why I couldn't compile in my first comment here.
---
gcc -std=gnu99 -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I../.. -pedantic -D_GNU_SOURCE -fvisibility=internal -I/usr/local/include -I/usr/include -fstack-protector-all -Wall -Werror -MT add.lo -MD -MP -MF .deps/add.Tpo -c add.c -fno-common -DPIC -o .libs/add.o
cc1: warnings being treated as errors
add.c: In function '_alpm_add_loadtarget':
add.c:114: warning: internal and protected visibility attributes not supported in this configuration; ignored
make[3]: *** [add.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
---
libalpm is compiled though, so that's awesome :)
Your line number is absolutely worthless to me- I have no clue what revision or anything you are building, or what you even mean by "enabling debugging".
I am using your freebsd branch with the latest HEAD. By "enabling debugging" I mean using the --enable-debug switch for ./configure, ie.:
./configure --enable-debug
Without this switch compilation succeeds, but as soon as I enable debugging it errors out on that warning. There are many occurrences of that warning, as seen in a previously attatched make.log.
As for the doc target, if I use --enable-asciidoc I get the same error. Of course if I use --disable-doc it finishes compiling successfully.
[eliott@freebsdbox /]$ uname -sr; pacman.static -V; pacman -V
FreeBSD 7.0-RELEASE
.--. Pacman v3.2.0devel - libalpm v2.3.1
/ _.-' .-. .-. .-. Copyright (C) 2002-2008 Judd Vinet
\ '-. '-' '-' '-'
'--'
This program may be freely redistributed under
the terms of the GNU General Public License
.--. Pacman v3.2.0devel - libalpm v2.3.1
/ _.-' .-. .-. .-. Copyright (C) 2002-2008 Judd Vinet
\ '-. '-' '-' '-'
'--'
This program may be freely redistributed under
the terms of the GNU General Public License