I have downloaded the latest source distribution of flite, and went about the usual process of installing it.
$ ./configure
$ make
$ sudo make install
However, I run into a strange error when I try to install the library to my system.
$ sudo make install
Installing
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
mkdir -p /usr/local/include/flite
/usr/bin/install -c -m 644 include/*.h /usr/local/include/flite
/usr/bin/install -c -m 755 ../bin/flite_time /usr/local/bin
cp -pd ../build/i386-darwin13.1.0/lib/libflite_cmu_us_kal.a ../build/i386-darwin13.1.0/lib/libflite_cmu_time_awb.a ../build/i386-darwin13.1.0/lib/libflite_cmu_us_kal16.a ../build/i386-darwin13.1.0/lib/libflite_cmu_us_awb.a ../build/i386-darwin13.1.0/lib/libflite_cmu_us_rms.a ../build/i386-darwin13.1.0/lib/libflite_cmu_us_slt.a ../build/i386-darwin13.1.0/lib/libflite_usenglish.a ../build/i386-darwin13.1.0/lib/libflite_cmulex.a ../build/i386-darwin13.1.0/lib/libflite.a /usr/local/lib
cp: illegal option -- d
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
make[1]: *** [install] Error 64
make: *** [install] Error 2
How can I fix this?
There a few subtle differences between the BSD
cpthat Mac uses and the GNUcpof most linux distributions.Consider the following snippet of
man cpfrom a linux box:So basically what it's trying to do is "copy the following paths, and if they're links, just copy the link, not the underlying file."
The
poption exists under Mac and is equivalent to the linux behavior. Thedoption, however, is absent.I've tried to figure out a way to mimic the behavior of "copy links, not targets" with the Mac
cp, and as far as I can tell, there's no pleasant way to do it.There is, fortunately, a gross work around. From
man cpunder Mac:In other words, since we know we're only copying files, you can simply replace the
dflag with theRflag. The behavior is technically different (very different), but it won't matter in this specific case. You'll need to find thecpflags used in the Makefile (hopefully in aCPvariable at the top of the file) and simply change them.If you're sure the
cpis the last thing to be executed in the Makefile, you could also just copy and paste it instead of changing the Makefile.