View Full Version : installing and using Macports
notwist
Mar 28, 2008, 08:54 AM
Is anyone familiar with Darwinports? I followed all the instructions here http://www.darwinports.com/install/ and everything seems fine. However, when I try installing a package from within Terminal like it says, there is no such file or directory. I am connected to the Internet so that's not the problem. What's wrong with this? I'm supposed to open a regular Terminal window and just type this correct?
kainjow
Mar 28, 2008, 09:46 AM
Did you do the "export PATH=..." part on that link? They say to add it to the ~/.profile file but I think that should be ~/.bash_profile
priller
Mar 28, 2008, 10:04 AM
Did you do the "export PATH=..." part on that link? They say to add it to the ~/.profile file but I think that should be ~/.bash_profile
~/.profile works fine for me.
post the results of
echo $PATH
kainjow
Mar 28, 2008, 10:06 AM
~/.profile works fine for me.
The reason I asked is because I've been using .bash_profile for a while and it works just fine. I guess I don't get the difference.
notwist
Mar 28, 2008, 11:02 PM
This is what i get when i do echo $PATH
/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/texbin
priller
Mar 29, 2008, 11:26 AM
Your path is right so can you post the full error message.
notwist
Mar 29, 2008, 03:32 PM
this is my error msg:
Bluth:~ cjjacob$ cd /opt/local/bin/portslocation/dports/botan
-bash: cd: /opt/local/bin/portslocation/dports/botan: No such file or directory
priller
Mar 29, 2008, 04:36 PM
I've just installed it with changing directory since I don't have that directory either, all I had to run was
sudo port install botan
notwist
Mar 29, 2008, 11:48 PM
Thanks! it worked however, when i try running one of the example codes, i get a whole bunch of errors saying it cannot find the botan/botan.h library. I ran the configure.pl script which is required but it isn't working. Here's where it's stuck:
Bluth:~/downloads/botan-1.6.3 cjjacob$ ./configure.pl
(autoconfig): Guessing your system config is gcc-darwin-i386
(note): Enabling -fpermissive to work around possible GCC bug
(autoconfig): Enabling module alloc_mmap
(autoconfig): Enabling module es_egd
(autoconfig): Enabling module es_ftw
(autoconfig): Enabling module es_unix
(autoconfig): Enabling module fd_unix
(autoconfig): Enabling module ml_unix
(autoconfig): Enabling module mp_ia32
(autoconfig): Enabling module mux_pthr
(autoconfig): Enabling module tm_unix
Bluth:~/downloads/botan-1.6.3 cjjacob$ make
g++ -Ibuild/include -O2 -finline-functions -mcpu=i686 -momit-leaf-frame-pointer -D_REENTRANT -ansi -Wno-long-long -fpermissive -W -Wall -fPIC -c src/adler32.cpp -o build/lib/adler32.o
cc1plus: error: invalid option 'cpu=i686'
make: *** [build/lib/adler32.o] Error 1
Bluth:~/downloads/botan-1.6.3 cjjacob$
priller
Mar 30, 2008, 06:39 AM
I got the same error but the following worked
cd Botan-1.6.3
./configure.pl --modules=comp_bzip2,comp_zlib
Edited Makefile and changed
MACH_OPT = -mcpu=i686 -momit-leaf-frame-pointer
to
MACH_OPT = -momit-leaf-frame-pointer
cd doc/examples
make
notwist
Mar 30, 2008, 02:33 PM
Thanks! It worked but... there is still an error.
Here is where it stops:
Bluth:~/downloads/botan-1.6.3 cjjacob$ make install
Installing Botan into /usr/local...
mkdir: /usr/local/doc: Permission denied
make: *** [install] Error 1
i tried this but it doesn't work either
Bluth:~/downloads/botan-1.6.3 cjjacob$ make OWNER=cjjacob install
Installing Botan into /usr/local...
mkdir: /usr/local/doc: Permission denied
make: *** [install] Error 1
Bluth:~/downloads/botan-1.6.3 cjjacob$
I really appreciate your help with this !
priller
Mar 30, 2008, 04:33 PM
You need to use sudo to install in some directories. So you'd run
sudo make install
then enter your password.
notwist
Mar 31, 2008, 09:42 PM
Ok so I'm still having some problems. I tried compiling and running some of the example code using g++ and it compiles with no errors but I don't know how to run it.
Bluth:~/desktop/test cjjacob$ g++ untitled.cpp
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
Botan::MAC_Filter::MAC_Filter(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Botan::OctetString const&, unsigned int)
Botan::get_cipher(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Botan::OctetString const&, Botan::OctetString const&, Botan::Cipher_Dir)
Botan::block_size_of(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
Botan::Base64_Decoder::Base64_Decoder(Botan::Decoder_Checking)
Botan::Base64_Encoder::Base64_Encoder(bool, unsigned int, bool)
Botan::max_keylength_of(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
Botan::have_block_cipher(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
Botan::LibraryInitializer::initialize(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
Botan::LibraryInitializer::deinitialize()
Botan::Zlib_Decompression::Zlib_Decompression()
Botan::S2K::change_salt(Botan::MemoryRegion<unsigned char> const&)
Botan::S2K::set_iterations(unsigned int)
Botan::Fork::Fork(Botan::Filter*, Botan::Filter*, Botan::Filter*, Botan::Filter*)
Botan::Pipe::process_msg(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
Botan::Pipe::DEFAULT_MESSAGE
Botan::Pipe::read_all_as_string(unsigned int)
Botan::Pipe::end_msg()
Botan::Pipe::read_all(unsigned int)
Botan::Pipe::start_msg()
Botan::Pipe::Pipe(Botan::Filter*, Botan::Filter*, Botan::Filter*, Botan::Filter*)
Botan::Pipe::~Pipe()
Botan::Chain::Chain(Botan::Filter*, Botan::Filter*, Botan::Filter*, Botan::Filter*)
Botan::get_s2k(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
Botan::operator>>(std::basic_istream<char, std::char_traits<char> >&, Botan::Pipe&)
Botan::S2K::derive_key(unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const
collect2: ld returned 1 exit status
Bluth:~/desktop/test cjjacob$
I tried ./a.out and searched the documents included but it didn't mention anything about how to run a program. Can you provide some insight into this?
I appreciate your help.
kevinfjbecker
Jul 15, 2008, 03:16 PM
If you find you self having to enter export commands every time you use macports, here is a suggestion:
If you don't have a .bash_profile you can just make one you self an put it in you home directory.
for reference, these are the export commands you'll put in the file:
export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
Another thing that you might have to do is to make it executable.
The command:
chmod u+x .bash_profile
will do that.
For those who'd like to know a bit more about what they're doing, here is a link:
http://cs.senecac.on.ca/~unx122/lectures/Lecture6.html
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.