Can't compile gegl (gimp) on PPC Leopard - dsym

I compile gegl-0.2.0 (needed to compile gimp-2.8) on PowerPC Mac Leopard 10.5.4.
All other programs such as glib-2.38.2, intltool-0.50.2 and babl which are necessary to compile gimp have been compiled fine.
I have this kind of errors while compiling gegl:
GEGL-geglmodule.c-Message: Module '../../operations/common/.libs/layer.so.dSYM
/Contents/Resources/DWARF/layer.so' load error: dlopen(../../operations/common
/.libs/layer.so.dSYM/Contents/Resources/DWARF/layer.so, 10): no suitable image found.
Did find
../../operations/common/.libs/layer.so.dSYM/Contents/Resources/DWARF/layer.so: can't map
I get this for each .so file produced by gegl, such as box-blur.so, brightness-contrast.so, motion-blur.so, contrast-curve.so, etc. Also I get this kind of errors for each of those .so files:
warning: no debug symbols in executable (-arch ppc)
CC motion-blur.c
CCLD motion-blur.la
The env variables are:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export CPPFLAGS="-I/usr/local/include:/usr/include -fno-inline"
export LIBS=-L/usr/local/lib
export CFLAGS="-Wno-long-double -arch ppc -fno-inline"
export DYLD_LIBRARY_PATH=/usr/X11/lib
If I remove the DYLD_LIBRARY_PATH variable, an error like "libjpeg.dylib,libpng.dylib,libtiff.dylib and libgl.dylib can't be found" comes up.
The compiler I use is (Apple) gcc-3.3, but the same errors come up if I use gcc-4.0 or gcc-4.2. I don't use XCode for anything.
What's the basic problem here and how to solve it? Thanks.

After some research, I discovered that the only way to prevent this error from happening was to prevent CC from producing dsym code. Surely it 's not so simple as it's in Xcode. It turned out that I had to edit the Makefile. There at the 188th line was:
DSYMUTIL = 'dsymutil'
I made it:
DSYMUTIL= ''
and that prevented dsym from being generated and I finally got rid of that error.
But after that I I got another error, about some "xxx.xml" file. To solve it, I added this to configure command:
./configure --disable-docs
Then I got the gegl perfectly compiled. FYI.

Related

Error while trying trying to run make command

I am trying to install a program and when I run make or make -f Makefile (following the installation instructions) I get the following output:
g77 -O5 -Wall -c prep_output.f -o prep_output.o
dyld: Symbol not found: ___keymgr_global
Referenced from: /usr/local/bin/g77
Expected in: /usr/lib/libSystem.B.dylib
make: *** [prep_output.o] Abort trap: 6
I am working on a macOS Mojave 10.14.6. Following some other proposed solutions in similar problems, I've already installed Command line tools in my Xcode but that didn't do the trick. Any suggestions please??
Thanks in advance
EDIT:
I got rid of g77 and installed a compatible version of gcc (gcc8) through MacPorts. After running the make command I get the following:
g77 -O5 -Wall -c prep_output.f -o prep_output.o
make: g77: No such file or directory
make: *** [prep_output.o] Error 1
So I guess the program still needs the g77 setup? This is the program btw ([http://www.cfht.hawaii.edu/~arnouts/LEPHARE/install.html]). Is there a way to rely to the gfortran compiler for building the program?
Thanks in advance
P.S. I noticed that when I install g77 I get the following error:
x usr/local/: Can't set user=0/group=0 for usr/local`
`tar: Error exit delayed from previous errors.
However it still installs g77..
The error message indicates that your installation of g77 is broken. This has nothing to do with make or the particular project you're trying to build, except inasmuch as the project is trying to use g77 in the first place. That is a bit surprising, actually, since g77 has been obsolete for years (gfortran is the current GNU Fortran compiler), but I'm uncertain what exactly to expect from XCode in this area.
On the other hand, since the full path to the binary is /usr/local/bin/g77, I'm further inclined to think that you're not using XCode for this at all. Possibly you've dumped a g77 built on some other system into your /usr/local/bin, and it's not compatible with your Mojave system.
Your best bet is probably to
Get rid of your broken g77 installation.
Install Fink or MacPorts, or a similar project.
Install the Fink / MacPorts / whatever package for gfortran (maybe gcc-gfortran or similar in some of those) to get a working Fortran compiler.
Rely on that compiler to build your project.

How to fix error: invalid value 'f95' in '-x f95'?

I'm using Fortran with CodeBlocks IDE, and when I try to build my code I get this error
error: invalid value 'f95' in '-x f95'
and after that there is no executable file. The thing is, when I write in the
terminal
gfortran nameofmyfile.f
I get the correct executable file "a.out".
Question: How can I fix this problem?
Especifications: I have mac OS X 10.8.5, installed xcode, gcc, and gfortran.
Your IDE uses the clang compiler which does not support Fortran.
See also https://answers.launchpad.net/mg5amcnlo/+question/698961 and https://developer.apple.com/forums/thread/70010.

gcc: error trying to exec 'as': execvp: No such file or directory

I was trying to install gcc and gfortran on my intel mac with mountain lion and keep getting the above error when trying to compile the fortran file. gcc doesn't seem to work either with c programs. This is the error I get with my c program:
test.c:1:19: fatal error: stdio.h: No such file or directory
I tried typing this into terminal:
export PATH=${PATH}:/usr/local/bin
but that did not work. I added gcc and gfortran to /usr/local/bin instead of /usr/bin. I downloaded the compilers through hpc. The files had the given directory structure:
/usr/local/bin: contained gcc and gfortran along with other compilers
/uer/local/include/...
/usr/local/lib/...
etc...
I pretty much just copied and pasted all the files directly over to the exact same path directories on my computer and ran the export command. That is all I have done.
You probably need either odcctools (as provided by macports) or XCode (which contains the Mac "binutils", and the Clang compiler, GCC was discontinued).

OSX 10.7.4 w/XCode 4.4.1 & GCC (Issues w/compiling straight C/C++)

The issue I'm having is that gcc (and family) don't appear to be properly setup. I have a 10.7.4 machine that I just installed Xcode on (from the app store). I've done no prior development on this machine.
Working w/in Xcode seems to work fine. I can build and compile no problem. However, trying to execute gcc command line fails.
First, I gcc wasn't on my path ... no big deal. I located it and ran as:
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -dynamiclib -fno-common -o s.dylib s.c
(I'm working on a lib w/some functions...). Anyways, it fails.
s.c:1:19: error: stdio.h: No such file or directory
s.c:2:20: error: stdlib.h: No such file or directory
s.c:3:20: error: string.h: No such file or directory
Surprise! hah, well I searched my machine for stdio.h and I can't find it anywhere. Since I've been out of the OSX game for a bit, I'm assuming I'm missing something -
Basically I want to be able to continue using Xcode but I want to be able to build C/C++/etc on the command line with all the dependencies (.h) in the correct place.
Any thoughts?
There are two main ways to run the compiler from the command line: the Command Line Tools package, and xcrun.
xcrun is particularly good if you just need this occasionally. Just stick "xcrun" at the start, like you'd do with sudo:
xcrun gcc -dynamiclib -fno-common -o s.dylib s.c
This will find the correct version of gcc and set the needed directories, etc. You can specify a specific SDK with --sdk.
If you do this a lot, download and install the Command Line Tools package (Xcode>Open Developer Tool>More Tools...; it also may be available in Preferences>Downloads). This installs a full copy of everything in /usr.
Probably xcrun is not enough if you are using 10.8.
Looking in to the clang documentation I found that you need to include the system root because you do not have your libraries in the standard place but inside Xcode.
using:
xcrun gcc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
or:
xcrun clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk

Compiling pulseaudio on Mac OS X with CoreServices.h

I'm trying to compile pulseaudio on Mac OS X, however by default I get lots of errors about not finding standard files like inttypes.h, errno.h or stdio.h. Putting -isystem/usr/include in CPPFLAGS fixes those errors, but then later on I get fatal error: 'CoreServices/CoreServices.h' file not found.
I've tried also adding -framework CoreServices and/or
-I/System/Library/Frameworks/CoreServices.framework/Headers but neither work.
What's the proper way of making the compiler find it?
I think I'm using clang, gcc produces even more errors.
You are on the right track, those are the framework and include flags but if you use the correct configuration options you will find even the system includes are picked up properly.
The Makefiles will attempt to set the framework appropriately based on the --with-mac-sysroot and --with-mac-version-min attributes.
Example configuration option to specify the SDK location:
--with-mac-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/
--with-mac-version-min=10.7
If you are building on Mountain lion (10.8) you still need to use the 10.7 minimum compatibility as there are headers missing in the 10.8 SDK which PulseAudio makes reference to.
You can pass the configure options to the autogen.sh which will run configure once autoconf has completed. You can try the following command which has been tested on the master branch:
./autogen.sh --prefix=/usr/local --disable-jack --disable-hal --disable-bluez --disable-avahi --with-mac-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ --with-mac-version-min=10.7 --disable-dbus
If you get m4 macro errors copy the m4 macros from aclocal into the m4 sub-directory and try again.
There are a few other problems but these are bound to be cleared up may date quickly. Adding it here as it may help someone trying to get this built.
error: Multiprocessing.h cannot be found:
This has been deprecated in 10.7 but the headers are still included it CoreServices and will build just change the include instruction in the file src/pulsecore/semaphore-osx.c.
-#include <Multiprocessing.h>
+#include <CoreServices/CoreServices.h>
error: ‘lt_PROGRAM_LTX_preloaded_symbols’ undeclared.
This may be a problem compiling src/daemon/dumpmodules.c and can be fixed by declaring the external macro.
extern const lt_dlsymlist lt_preloaded_symbols[];
error: gdbm.h: No such file or directory
For some reason the default include dir is not considered by the compiler and you can add the path to the src/Makefile look for and set the variable GDBM_CFLAGS.
GDBM_CFLAGS=-I/usr/local/include
nJoy!

Resources