error installing git-core +svn (actually dies building db44)
I'm using MacPorts 1.520 I first installed just git-core which all went fine and then realized that I needed git-svn to import a svn repo into git so I followed the first install with: sudo port install git-core +svn I'm getting this error in the build process: ---> Building db44 with target all Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_db44/work/db-4.4.20/build_unix" && make all " returned error 2 Command output: /bin/sh ./libtool --mode=compile /usr/bin/gcc-4.0 -c -O2 -I../dist/.. -I/opt/local/include ../dist/../db_dump185/db_dump185.c /usr/bin/gcc-4.0 -c -O2 -I../dist/.. -I/opt/local/include ../dist/../db_dump185/db_dump185.c -fno-common -DPIC -o .libs/db_dump185.o ../dist/../db_dump185/db_dump185.c: In function 'main': ../dist/../db_dump185/db_dump185.c:212: warning: assignment makes pointer from integer without a cast ../dist/../db_dump185/db_dump185.c:214: warning: assignment makes pointer from integer without a cast ../dist/../db_dump185/db_dump185.c:229: error: 'struct __db' has no member named 'seq' ../dist/../db_dump185/db_dump185.c:229: error: 'R_NEXT' undeclared (first use in this function) ../dist/../db_dump185/db_dump185.c:229: error: (Each undeclared identifier is reported only once ../dist/../db_dump185/db_dump185.c:229: error: for each function it appears in.) ../dist/../db_dump185/db_dump185.c:234: error: 'struct __db' has no member named 'seq' ../dist/../db_dump185/db_dump185.c: In function 'db_hash': ../dist/../db_dump185/db_dump185.c:262: error: 'struct __db' has no member named 'internal' ../dist/../db_dump185/db_dump185.c:264: error: 'struct __db' has no member named 'internal' ../dist/../db_dump185/db_dump185.c: In function 'db_btree': ../dist/../db_dump185/db_dump185.c:289: error: 'struct __db' has no member named 'internal' make: *** [db_dump185.lo] Error 1 I tried: sudo port clean --all db44 sudo port install db44 and got the same error. any suggestions? Thanks
Reading Ryan's last message. I realized that my problem could be interactions with libraries I had already installed into /usr/local so I tried this: $ sudo mv /usr/local /usr/localx $ sudo port install db44 Library not loaded: /usr/local/lib/libreadline.5.1.dylib Referenced from: /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib Reason: image not found while executing "load /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib" ("package ifneeded" script) invoked from within "package require Pextlib 1.0" (procedure "mportinit" line 365) invoked from within "mportinit ui_options global_options global_variations" Error: /opt/local/bin/port: Failed to initialize MacPorts, Library not loaded: /usr/local/lib/libreadline.5.1.dylib Referenced from: /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib Reason: image not found Clue ...! OK ... so a bunch of my ports were probably built using things in /usr/local -- and this isn't useful. Is there a quick way I can tell ports to build everything again? Is there a better way to have code built from source in /usr/local and other code built with ports (that use some libraries in common) and not have them interact without temporarily renaming /usr/local?
On Aug 21, 2007, at 16:49, Stephen Bannasch wrote:
Reading Ryan's last message. I realized that my problem could be interactions with libraries I had already installed into /usr/local so I tried this:
$ sudo mv /usr/local /usr/localx $ sudo port install db44 Library not loaded: /usr/local/lib/libreadline.5.1.dylib Referenced from: /opt/local/share/macports/Tcl/pextlib1.0/ Pextlib.dylib Reason: image not found while executing "load /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib" ("package ifneeded" script) invoked from within "package require Pextlib 1.0" (procedure "mportinit" line 365) invoked from within "mportinit ui_options global_options global_variations" Error: /opt/local/bin/port: Failed to initialize MacPorts, Library not loaded: /usr/local/lib/libreadline.5.1.dylib Referenced from: /opt/local/share/macports/Tcl/pextlib1.0/ Pextlib.dylib Reason: image not found
Clue ...!
OK ... so a bunch of my ports were probably built using things in / usr/local -- and this isn't useful.
Is there a quick way I can tell ports to build everything again?
No... And in this case, it's MacPorts itself that was built against readline, so you'll have to reinstall MacPorts. You could download the 1.5.0 disk image from www.macports.org and install it, then you should (provided you've moved /usr/local out of the way) be able to selfupdate to 1.5.2.
Is there a better way to have code built from source in /usr/local and other code built with ports (that use some libraries in common) and not have them interact without temporarily renaming /usr/local?
No... I recommend you have nothing directly in /usr/local. If possible, install that software with MacPorts as well. If no portfiles exist, you could write them and contribute them to the project. Portfiles are fairly easy to write. You can look at how the existing portfiles are written, or read the new manual that's being developed.
At 5:24 PM -0500 8/21/07, Ryan Schmidt wrote:
On Aug 21, 2007, at 16:49, Stephen Bannasch wrote:
Is there a better way to have code built from source in /usr/local and other code built with ports (that use some libraries in common) and not have them interact without temporarily renaming /usr/local?
No... I recommend you have nothing directly in /usr/local. If possible, install that software with MacPorts as well. If no portfiles exist, you could write them and contribute them to the project. Portfiles are fairly easy to write. You can look at how the existing portfiles are written, or read the new manual that's being developed.
Thanks for responding Ryan. Oh dear ... that's sounds like a bunch of work ... but I'll consider it. Most of what I've got in /usr/local I could get through ports. I've got two basic questions: 1) If I install ruby with port will the ruby libraries I then install with ruby gems compile their native extensions correctly? This is a specific case of the more general issue where I use port to install an environment that then expects to be able to run it's own package management system and compile code using shared libraries. 2) When I am playing or working with some bleeding edge software checked out from a repository (Ruby 1.9, Rubinus, etc) normally it would normally be setup to install itself in /usr/local. Where would I install it instead? This might be software that I regularly 'svn up' and make -- I don't assume I'd install it in /opt/local -- I assume that the software in that tree would only be managed through port. I checked the wiki for information on my questions: http://trac.macosforge.org/projects/macports/wiki In the FAQ page:
Why is /opt/local the default install location for MacPorts? /opt/local was chosen so as to avoid stomping on other various installations (e.g. fink uses /sw to do the same); /usr/local is not a viable choice for several reasons: 1. Some software (especially auto* tools from Gnu) look in /usr/local as a default location, which means MacPorts can't be easily isolated when needed 2. /usr/local is usually reserved for the given system's admin to install items local to that system, and tends to be a bad choice to have taken over by a non-system port system 3. gcc considers /usr/local to be a standard system directory, causing (at least) the include directory to be unable to appear early in the list of include directories, and hence causing MacPorts-installed items to be difficult to use properly for items which need them (where another version is installed elsewhere, like /usr/X11R6)
I'm not sure exactly what #3 is saying but it sounds like it's related to the root problem about why port has problems with parallel libraries installed in /usr/local -- when port is using gcc to compile it's applications and libraries it can't tell gcc to ignore /usr/local. I thought I'd read up on the issues but the link mentioned here:
Some responses concerning /usr/local have been aired on the mailing list over time.
http://www.opendarwin.org/pipermail/darwinports/2004-May/021190.html Is a dead link -- I suppose I could use the Wayback Machine to find the thread ... sigh Understanding these issues better might help me answer my second question. Also the links to "Documentation" don't open ...? Example: http://www.darwinports.org/docs/ch03s05.html Earlier I had installed specific versions of APR, SVN, SQLite, and the Python bindings in order to run Trac (not using port) an the Trac doc was very specific about compatible versions but this caveat worries me:
Is it possible to have a dependency on a specific variant of another port? E.g. "postgresql8 +server"? No. The current state of the dependency engine is unable to handle specifying anything beyond "port X requires port Y" or "port X requires a file which can be provided by port Y." There have been discussions on revamping the engine (see the mailing list archives) but nothing concrete as yet. This is why the most useful variants really shouldn't be variants at all but rolled into the port itself.
There are two basic ways to answer my question about ruby installed with port. Install another copy of MacOS somewhere and try it ... or ... figure out what the ruby port does. I couldn't find much documentation in the wiki about how the portfiles themselves. Where the best root for the documentation which would tell me where the ruby portfile is defined and how to interpret what it does? I need Ruby 1.8.5-p12 installed because there are some serious bugs in 1.8.6. The only portfile listed for Ruby is 1.8.6. Can I make a local repository of portfiles and adapt the 1.8.6 portfile to install the version of 1.8.5 I need instead? I'm sure this is possible but where is it documented? When I built Ruby myself I used these parameters to config: --prefix=/usr/local --enable-pthread --with-readline-dir=/usr/local --enable-shared I'd like to be able to see if the ruby portfile uses equivalent parameters (obviously readline would be pointed elsewhere.
On Aug 21, 2007, at 20:52, Stephen Bannasch wrote:
At 5:24 PM -0500 8/21/07, Ryan Schmidt wrote:
On Aug 21, 2007, at 16:49, Stephen Bannasch wrote:
Is there a better way to have code built from source in /usr/ local and other code built with ports (that use some libraries in common) and not have them interact without temporarily renaming / usr/local?
No... I recommend you have nothing directly in /usr/local. If possible, install that software with MacPorts as well. If no portfiles exist, you could write them and contribute them to the project. Portfiles are fairly easy to write. You can look at how the existing portfiles are written, or read the new manual that's being developed.
Thanks for responding Ryan.
Oh dear ... that's sounds like a bunch of work ... but I'll consider it.
Most of what I've got in /usr/local I could get through ports. I've got two basic questions:
1) If I install ruby with port will the ruby libraries I then install with ruby gems compile their native extensions correctly? This is a specific case of the more general issue where I use port to install an environment that then expects to be able to run it's own package management system and compile code using shared libraries.
I don't know; I don't use ruby. Maybe someone else can help. I'm sure I've heard talk of ruby gems on this list before. You could search the archives.
2) When I am playing or working with some bleeding edge software checked out from a repository (Ruby 1.9, Rubinus, etc) normally it would normally be setup to install itself in /usr/local. Where would I install it instead? This might be software that I regularly 'svn up' and make -- I don't assume I'd install it in / opt/local -- I assume that the software in that tree would only be managed through port.
Anywhere other than /usr/local. For example, /usr/local/ruby would be ok. Or /myruby. Or wherever. Just not /usr/local because gcc always checks there first. Also, sometimes we have *-devel ports for new unfinished versions of software. (For example, we currently have mutt-devel, mysql5-devel, php5-devel, etc.) You (or the ruby maintainer) could create a ruby- devel port if that's desired.
I checked the wiki for information on my questions:
http://trac.macosforge.org/projects/macports/wiki
In the FAQ page:
Why is /opt/local the default install location for MacPorts? /opt/local was chosen so as to avoid stomping on other various installations (e.g. fink uses /sw to do the same); /usr/local is not a viable choice for several reasons: 1. Some software (especially auto* tools from Gnu) look in /usr/ local as a default location, which means MacPorts can't be easily isolated when needed 2. /usr/local is usually reserved for the given system's admin to install items local to that system, and tends to be a bad choice to have taken over by a non-system port system 3. gcc considers /usr/local to be a standard system directory, causing (at least) the include directory to be unable to appear early in the list of include directories, and hence causing MacPorts-installed items to be difficult to use properly for items which need them (where another version is installed elsewhere, like /usr/X11R6)
I'm not sure exactly what #3 is saying but it sounds like it's related to the root problem about why port has problems with parallel libraries installed in /usr/local -- when port is using gcc to compile it's applications and libraries it can't tell gcc to ignore /usr/local.
Right. gcc automatically checks /usr/local. We don't want that, but don't yet know how to suppress it.
I thought I'd read up on the issues but the link mentioned here:
Some responses concerning /usr/local have been aired on the mailing list over time.
http://www.opendarwin.org/pipermail/darwinports/2004-May/021190.html
Is a dead link -- I suppose I could use the Wayback Machine to find the thread ... sigh
Right, sorry. opendarwin is dead.
Understanding these issues better might help me answer my second question.
Also the links to "Documentation" don't open ...? Example:
Right, sorry. The old darwinports.org site is dead. The guide is being rewritten. These links in the FAQ should probably be replaced or removed.
Earlier I had installed specific versions of APR, SVN, SQLite, and the Python bindings in order to run Trac (not using port) an the Trac doc was very specific about compatible versions but this caveat worries me:
Is it possible to have a dependency on a specific variant of another port? E.g. "postgresql8 +server"? No. The current state of the dependency engine is unable to handle specifying anything beyond "port X requires port Y" or "port X requires a file which can be provided by port Y." There have been discussions on revamping the engine (see the mailing list archives) but nothing concrete as yet. This is why the most useful variants really shouldn't be variants at all but rolled into the port itself.
There are two basic ways to answer my question about ruby installed with port. Install another copy of MacOS somewhere and try it ... or ... figure out what the ruby port does. I couldn't find much documentation in the wiki about how the portfiles themselves.
Where the best root for the documentation which would tell me where the ruby portfile is defined and how to interpret what it does?
You can find where the ruby portfile is by typing "port file ruby". You can see it in your preferred editor by typing "port edit ruby". You can show it in the terminal by typing "port cat ruby". You can learn who the maintainer of the ruby port is by typing "port info ruby". You can contact the maintainer if you have questions about specific things the portfile does.
I need Ruby 1.8.5-p12 installed because there are some serious bugs in 1.8.6. The only portfile listed for Ruby is 1.8.6. Can I make a local repository of portfiles and adapt the 1.8.6 portfile to install the version of 1.8.5 I need instead?
Yes, you could do this. You could also look in the MacPorts Subversion repository and see if and older version of the portfile was ever written for 1.8.5-p12, and if so, use that. (I checked: there was such a version: http://trac.macosforge.org/projects/ macports/browser/trunk/dports/lang/ruby/Portfile?rev=21127 )
I'm sure this is possible but where is it documented?
The guide is being rewritten and is currently available in its unfinished form at: http://geeklair.net/new_macports_guide/
When I built Ruby myself I used these parameters to config:
--prefix=/usr/local --enable-pthread --with-readline-dir=/usr/local --enable-shared
I'd like to be able to see if the ruby portfile uses equivalent parameters (obviously readline would be pointed elsewhere.
participants (2)
-
Ryan Schmidt
-
Stephen Bannasch