fontforge building in brew, terminal cant find gcc error - gcc

This is my first time trying to compile source code in terminal (I installed gimp using macPorts but this could be part of the problem...?)
I want to install fontforge and I was following these instructions how to install fontforge.
I got this warning while installing brew:
Warning: The following *evil* dylibs exist in /usr/local/lib
They may break builds or worse. You should consider deleting them:
/usr/local/lib/libssl.0.9.8.dylib
I could not find usr/local/lib and the only libssl file was in opt/local/lib called libssl.1.0.0.dylib which is supposed to be hidden apparently...
I made it to the "brew install cairo --use-clang" step, then when I try the "brew install fontforge --use-gcc" step I get the following warning:
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
==> Installing fontforge dependency: gettext
Error: GCC could not be found
when I check gcc version I get:
:~ me$ gcc --V
i686-apple-darwin11-llvm-gcc-4.2: no input files
Do I need to uninstall macports (then re-install gimp?)
I read gcc comes with xcode, I have xcode 4.3 (upgraded after this issue but didn't fix it) so do I have gcc or not? is there another way to check etc.
Can anyone tell me what I am doing wrong (what I broke etc)?
NOTE I also have flashbuilder which has a program called gcc as well (I dont know if this broke the other gcc...)

Related

Installing Homebrew + nginx + rtmp in macOS Movaje 10.14

I was able to install Homebrew + nginx + rtmp in macOS High Sierra 10.13. Now I want do the same on macOS Mojave 10.14.
So let's start ... istallation of Homebrew, first we need Xcode in terminal...
xcode-select –install
than. We need homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
than install nginx + rtmp
And here's the problem
I tried:
brew install nginx-full --with-rtmp-module
but it won't work
the result:
Updating Homebrew...
Usage: brew install [options] formula
Install formula. Additional options specific to formula may be appended to the command.
Unless HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will then be run for
the installed formulae or, every 30 days, for all formulae.
-d, --debug If brewing fails, open an interactive
debugging session with access to IRB or a
shell inside the temporary build directory.
--env If std is passed, use the standard build
environment instead of superenv. If super
is passed, use superenv even if the formula
specifies the standard build environment.
--ignore-dependencies An unsupported Homebrew development flag to
skip installing any dependencies of any
kind. If the dependencies are not already
present, the formula will have issues. If
you're not developing Homebrew, consider
adjusting your PATH rather than using this
flag.
--only-dependencies Install the dependencies with specified
options but do not install the formula
itself.
--cc Attempt to compile using the specified
compiler, which should be the name of the
compiler's executable, e.g. gcc-7 for GCC
7. In order to use LLVM's clang, specify
llvm_clang. To use the Apple-provided
clang, specify clang. This option will
only accept compilers that are provided by
Homebrew or bundled with macOS. Please do
not file issues if you encounter errors
while using this option.
-s, --build-from-source Compile formula from source even if a
bottle is provided. Dependencies will still
be installed from bottles if they are
available.
--force-bottle Install from a bottle if it exists for the
current or newest version of macOS, even if
it would not normally be used for
installation.
--include-test Install testing dependencies required to
run brew test formula.
--devel If formula defines it, install the
development version.
--HEAD If formula defines it, install the HEAD
version, aka. master, trunk, unstable.
--fetch-HEAD Fetch the upstream repository to detect if
the HEAD installation of the formula is
outdated. Otherwise, the repository's HEAD
will only be checked for updates when a new
stable or development version has been
released.
--keep-tmp Retain the temporary files created during
installation.
--build-bottle Prepare the formula for eventual bottling
during installation, skipping any
post-install steps.
--bottle-arch Optimise bottles for the specified
architecture rather than the oldest
architecture supported by the version of
macOS the bottles are built on.
-f, --force Install without checking for previously
installed keg-only or non-migrated
versions.
-v, --verbose Print the verification and postinstall
steps.
--display-times Print install times for each formula at the
end of the run.
-i, --interactive Download and patch formula, then open a
shell. This allows the user to run
./configure --help and otherwise
determine how to turn the software package
into a Homebrew package.
-g, --git Create a Git repository, useful for
creating patches to the software.
-h, --help Show this message.
Error: invalid option: --with-rtmp-module
so i tried:
brew install nginx --with-rtmp-module
but.....result:
Updating Homebrew...
Error: No available formula with the name "–with-rtmp-module"
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
so I decided to try install nginx first and than rtmp module
brew install nginx
and than i tried:
brew install nginx libnginx-mod-rtmp (copying from Linux)
brew install rtmp-module
brew install module-rtmp
But none of the above worked. How do I resolve it?
You should tap a nginx formulae before try install nginx-full
Well you can try denji/nginx, since homebrew/nginx tap has been deprecated, That's:
brew tap denji/nginx
then
brew install nginx-full --with-rtmp-module
That works for me.

updating octave: linking the installation

I have OSX 10.10.5 with Octave 3.4.0 running (installed, who knows how, I did it a million different ways through port, file extraction, ftp, homebrew…). I tried to update my Programme (brew install octave or sudo port install octave) and Terminal spits out:
Warning: octave-3.8.2 already installed, it's just not linked
Okay, great. So I have a better programme somewhere installed. What now? How on earth am I supposed to “just link” the newer installation?
If you install octave with Homebrew and it doesn't link it it should tell you why. You can force Homebrew to link octave with
$ brew link --overwrite octave
You can also add the --dry-run option to check and see what Homebrew will do to link octave
$ brew link --overwrite --dry-run octave
A possible reason for Homebrew not linking octave is that you've installed it by another method, MacPorts for instance. It is not recommended that you use both Homebrew and MacPorts on the same system.

Installing openCV 2.4.2 on Mac OS X 10.9 (Mavericks)

I'm trying to install openCV 2.4.2 (not the newest version but stable version compatible with newer OS X according to several sources) on Mac OS X 10.9 (Mavericks). I have tried installing from source and using homebrew but neither works. I get the following error when I try installing it:
build Marieke$ make
[ 25%] Building CXX object modules/ts/CMakeFiles/opencv_ts.dir/src/precomp.cpp.o
In file included from /users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/src/precomp.cpp:1:
In file included from /users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/src/precomp.hpp:2:
In file included from /users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/include/opencv2/ts/ts.hpp:40:
/users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/include/opencv2/ts/ts_gtest.h:1657:13: fatal error:
'tr1/tuple' file not found
# include <tr1/tuple> // NOLINT
^
1 error generated.
make[2]: *** [modules/ts/CMakeFiles/opencv_ts.dir/src/precomp.cpp.o] Error 1
make[1]: *** [modules/ts/CMakeFiles/opencv_ts.dir/all] Error 2
make: *** [all] Error 2
I don't know how to solve this and I have tried several things already (I do now have newest versions of Xcode, cmake, ffmpeg, faac, faad, qt, ...) so if anybody can help me, that would be much appreciated, thanks!
Run the following commands assuming you have brew installed.
brew tap homebrew/science
brew install opencv
Use macports. Once you install macports, just run
sudo port install opencv
at the command prompt.
This other stackoverflow question is mostly correct for how to start using the macports version of opencv in Xcode.
Here are some more up-to-date instructions for using the macports version of OpenCV from Xcode 5:
Create a new Xcode project as OS X Application -> Command Line Tool, etc.
Click the target in the upper left
Click the Build Settings tab
Scroll down to (or search for) the Search Paths section
Under User Header Search Paths add /opt/local/include
Click the Build Phases tab
Click Link Binary with Libraries
Choose the required libraries from /opt/local/lib
At least, add libopencv_core.dylib
If you want pre-set command-line arguments, go to Product -> Scheme -> Edit Scheme (⌘<)
Click the Run tab on the left
Click the Arguments tab
Enter arguments into Arguments Passed on Launch
Done!
You can try to install opencv from homebrew, I met the same problem with cmake in my 10.9 and finally I found the solution from Chris Muktar. Here are the steps:
Make sure xcode-select --install Xcode command line tools 5.0.1 are installed.
Install python using brew - brew install python.
pip update
pip install numpy
brew linkapps
Add export PYTHONPATH=/usr/local/Cellar/opencv/2.4.6.1/lib/python2.7/site-packages:$PYTHONPATH to .bash_profile in your home directory
brew install opencv
In the last step I came across the Error: No available formula for opencv. In this case, you should first run the command brew tap homebrew/science.
Good Luck
This may be related to the current issues with Qt on Mavericks.
See: https://github.com/mxcl/homebrew/pull/23793
I'd try installing the current patched homebrew keg for qt, and then installing opencv:
brew update
brew uninstall opencv
brew uninstall qt
brew install -v https://raw.github.com/cliffrowley/homebrew/patched_qt/Library/Formula/qt.rb --HEAD
brew install opencv
Caution to the wind: the qt build took me about an hour to complete
Thanks for the answers!
I ended up with the following solution: I added #define GTEST_USE_OWN_TR1_TUPLE 1 to ts_gtest.h. Probably not the prettiest solution but I don't need gtest for anything else so it works for me.
You could disable ts module in CMakeCache.txt file:
//Include opencv_ts module into the OpenCV build
BUILD_opencv_ts:BOOL=OFF
I mean that there is no reason to modify existing code.
I think you really need to do a configuration and that is it.
I tried your problems and I think steps are as follow:
open terminal in mac
in the terminal, check you have cmake and ccmake. If not, please type "brew install cmake"
go to your downloaded opencv folder, make a new folder by typing "mkdir build", then "cd build"
in this build folder, check you have gcc and g++ installed.
now, doing configuration by type "ccmake .. -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++", type "c" first for configuration then exit by "e" then "g" for generating!
you should be in terminal again now! then please type "make"
type "sudo make install", and now the opencv is installed, check it by type "brew list", and you should see the opencv there
type "brew linkapps"
do a test if you have python, by typing "import cv", and it should be working!

tesseract install mac os

I am trying to install tesseract on my mac using homeBrew. When I try installing, everything seems to be good but I get the following error/message:
Warning: Could not link leptonica. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link leptonica'
When I try running a tesseract function, I get the following error:
Tesseract Open Source OCR Engine v3.02.02 with Leptonica
Error in pixReadStreamPng: function not present
Error in pixReadStream: png: no pix returned
Error in pixRead: pix not read
Unsupported image type.
I have image magick installed and the command I used to install tesseract was:
brew install tesseract
Can anyone please tell me what I can do to get tesseract working? Thank you!
EDIT
When I run brew link leptonica, I get the following error:
Could not symlink file: /usr/local/Cellar/leptonica/1.69/bin/yuvtest
Target /usr/local/bin/yuvtest already exists. You may need to delete it.
Now, as of September 2019, there are no longer any optional install flags available
brew options tesseract
yield nothing. But,
brew info tesseract
yields the following key info:
This formula contains only the "eng", "osd", and "snum" language data files.
If you need all the other supported languages, `brew install tesseract-lang`.
Therefore, to get all of the languages installed, you need to now install a separate library called tesseract-lang.
Updated installation:
brew install tesseract
brew install tesseract-lang
Hope this helps.
old in case this is useful:
Now, as of January 2019, Tesseract installs fine via homebrew, as long as you have xquartz installed first, brew cask install xquartz. Then you can do the following: brew install tesseract --with-all-languages --with-serial-num-pack --with-training-tools
After installing / removing and re-installing tesseract i found the solution for the same problem you have. On your terminal logs, while installing tesseract, you will see:
Error: The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/convertfilestopdf
Target /usr/local/bin/convertfilestopdf
already exists.
You may want to remove it:
rm '/usr/local/bin/convertfilestopdf'
To force the link and overwrite all conflicting files:
brew link --overwrite leptonica
To list all files that would be deleted:
brew link --overwrite --dry-run leptonica
What i did was running: brew link --overwrite leptonica
"Linking /usr/local/Cellar/leptonica/1.71_1... 45 symlinks created"
Everything should work perfectly.
Hope this can be a help for you
It sounds a bit silly, but have you tried deleting yuvtest? I just tried it myself - the file is automatically generated by brew link leptonica. As for why it isn't working, is it possible you had some version of leptonica/tesseract installed previously? Another reasonable guess at a fix would be
brew uninstall tesseract; brew install tesseract
So far as I know, image magick being installed shouldn't matter for tesseract. They don't have anything in common.
Tesseract is now dependent on Leptonica being installed.
The error messages you are seeing relate to these files:
Leptonica is configured to handle image I/O using these external libraries: libjpeg, libtiff, libpng, libz, libgif, libwebp.
These libraries are easy to obtain. For example, using the debian package manager:
sudo apt-get install
where = {libpng12-dev, libjpeg62-dev, libtiff4-dev}.
Source: Leptonica unofficial documentation
I found that homebrew would install some but not all of the libraries.

How can I force Homebrew to install 64-bit PostgreSQL on OSX SL? Specifically the libpg.dylib file

I have been trying to install the Ruby PG gem, but kept getting the "Failed to build gem native extension." error.
After sifting through a lot of google results, I tried nearly every recommendation I came across, all without luck. However, I believe I've tracked down the source of the problem ... Homebrew.
Homebrew installed PostgreSQL 9.0.4, but only with the 32-bit libraries. As I am running Snow Leopard (10.6.8) with XCode 3.26, I need the 64-bit libraries in order to compile everything without library mismatch errors. But I cannot seem to find out how to force Homebrew to install them, even with ARCHFLAGS and ENV set to "-arch x86_64".
Suggestions, please :)
p.s. I found out that I only had 32-bit libraries installed by running:
file /usr/local/Cellar/postgresql/9.0.4/lib/libpq.5.3.dylib
which returned:
/usr/local/Cellar/postgresql/9.0.4/lib/libpq.5.3.dylib: Mach-O dynamically linked shared library i386
Update: re-installed Homebrew, which installed postgresql/9.1.1 and 64-bit shared libraries.
But another problem emerged, while installing the PG gem. For some reason it was looking for ginstall in /opt/local/bin. As I had removed MacPorts, that directory was also removed. I did find this solution:
mkdir -p /opt/local/bin/
sudo ln -s /usr/bin/install /opt/local/bin/ginstall
And now everything seems to be working ....
So it looks like my first install, using Homebrew, must have been done with regular Leopard.
Removing the Homebrew "Cell" directory and all of its contents, running the install script again, then doing "brew install" and "brew update" with all needed packages, got me the latest version of PostgreSQL, with 64-bit developer library.
And creating the above symbolic link fixed any left over errors from the MacPorts removal.
Now all is well :)

Resources