Re: Problem building on OSX



Thanks for the assist Marius, but so far my luck hasn't changed ...

On Oct 16, 2007, at 6:41 PM, Marius Schamschula wrote:

Dave,

Try passing 

CPPFLAGS=-I/usr/local/include

and

LDFLAGS="-flat_namespace -L/usr/local/lib"


This results in the system not being able to build executables:


 $ ./configure PKG_CONFIG=/usr/local/bin/pkg-config GETTEXT_PACKAGE=/usr/local/bin/gettext CPPFLAGS=-l/usr/local/include LDFLAGS=-flat_namespace -L/usr/local/lib

## --------- ##
## Platform. ##
## --------- ##

hostname = diags.aquaflo.com
uname -m = Power Macintosh
uname -r = 8.10.0
uname -s = Darwin
uname -v = Darwin Kernel Version 8.10.0: Wed May 23 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC

/usr/bin/uname -p = powerpc
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
Darwin Kernel Version 8.10.0: Wed May 23 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC
Kernel configured for a single processor only.
1 processor is physically available.
Processor type: ppc7450 (PowerPC 7450)
Processor active: 0
Primary memory available: 512.00 megabytes
Default processor set: 67 tasks, 193 threads, 1 processors
Load average: 4.82, Mach factor: 0.29
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown
...
configure:3094: gcc -v >&5
Reading specs from /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/specs
Configured with: /private/var/tmp/gcc/gcc-4061.obj~8/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)
configure:3097: $? = 0
configure:3104: gcc -V >&5
gcc: argument to `-V' is missing
configure:3107: $? = 1
configure:3130: checking for C compiler default output file name
configure:3157: gcc  -l/usr/local/include -flat_namespace -L/usr/local/lib conftest.c  >&5
/usr/bin/ld: can't locate file for: -l/usr/local/include
collect2: ld returned 1 exit status
configure:3160: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "glib"
| #define PACKAGE_TARNAME "glib"
| #define PACKAGE_VERSION "2.14.1"
| #define PACKAGE_STRING "glib 2.14.1"
| #define GLIB_MAJOR_VERSION 2
| #define GLIB_MINOR_VERSION 14
| #define GLIB_MICRO_VERSION 1
| #define GLIB_INTERFACE_AGE 1
| #define GLIB_BINARY_AGE 1401
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3199: error: C compiler cannot create executables


Hmm. Next I tried a few variations on the theme. If I use CPPFLAGS=-L/usr/local/include instead (capitol L instead of lowercase l), I end up with the same original problem. I also tried running with just the LDFLAGS argument and then tried changing the LDFLAGS argument to LDFLAGS="-flat_namespace -L/usr/local/include" just for fun, but still no luck:


  $ ./configure PKG_CONFIG=/usr/local/bin/pkg-config GETTEXT_PACKAGE=/usr/local/bin/gettext LDFLAGS=-flat_namespace -L/usr/local/lib CPPFLAGS=-L/usr/local/include
...
configure:8634: checking for libintl.h
configure:8641: result: yes
configure:8652: checking for ngettext in libc
configure:8680: gcc -o conftest -g -O2 -L/usr/local/include -flat_namespace -L/usr/local/lib -framework Carbon conftest.c  >&5
/usr/bin/ld: Undefined symbols:
_libintl_ngettext
collect2: ld returned 1 exit status


Any other thoughts? I'm starting to feel rather lost and can't believe that I'm the first to encounter this issue, it's to fundamental (it won't build!).



On Oct 16, 2007, at 12:48 PM, Dave Stewart wrote:

Hi folks!

I'm actually trying to build Wireshark on a Mac mini running OSX 10.4.10, but to do that I have to first build GTK2. So far, I'm not even that far.

I've grabbed pkg-config and gettext and have successfully built both of them in the /usr/local/bin directory. Trying to build glib2 though always results in the same problem:


...
checking for LC_MESSAGES... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for ngettext in libc... no
checking for bindtextdomain in -lintl... yes
checking for ngettext in -lintl... yes
checking for dgettext in -lintl... yes
checking for bind_textdomain_codeset... yes
checking for msgfmt... no
configure: error:
*** You must have either have gettext support in your C library, or use the


The config.log file always shows the same problem:


  $ ./configure PKG_CONFIG=/usr/local/bin/pkg-config GETTEXT_PACKAGE=/usr/local/bin/gettext

## --------- ##
## Platform. ##
## --------- ##

hostname = diags.aquaflo.com
uname -m = Power Macintosh
uname -r = 8.10.0
uname -s = Darwin
uname -v = Darwin Kernel Version 8.10.0: Wed May 23 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC

/usr/bin/uname -p = powerpc
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
Darwin Kernel Version 8.10.0: Wed May 23 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC
Kernel configured for a single processor only.
1 processor is physically available.
Processor type: ppc7450 (PowerPC 7450)
Processor active: 0
Primary memory available: 512.00 megabytes
Default processor set: 74 tasks, 223 threads, 1 processors
Load average: 5.16, Mach factor: 0.19
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /bin
PATH: /sbin
PATH: /usr/bin
PATH: /usr/sbin
...
configure:3077: checking for C compiler version
configure:3084: gcc --version >&5
gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1809)
((NOTE: ALSO TRIED ...))
configure:3077: checking for C compiler version
configure:3084: gcc --version >&5
powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer, Inc. build 4061)
...
configure:8501: checking libintl.h usability
configure:8518: gcc -c -g -O2 -L/usr/local/bin conftest.c >&5
configure:8524: $? = 0
configure:8531: test -z "$ac_c_werror_flag" || test ! -s conftest.err
configure:8534: $? = 0
configure:8541: test -s conftest.o
configure:8544: $? = 0
configure:8555: result: yes
configure:8559: checking libintl.h presence
configure:8574: gcc -E -L/usr/local/bin conftest.c
configure:8580: $? = 0
configure:8601: result: yes
configure:8634: checking for libintl.h
configure:8641: result: yes
configure:8652: checking for ngettext in libc
configure:8680: gcc -o conftest -g -O2 -L/usr/local/bin  -framework Carbon conftest.c  >&5
ld: Undefined symbols:
_libintl_ngettext
configure:8686: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "glib"
| #define PACKAGE_TARNAME "glib"
| #define PACKAGE_VERSION "2.14.1"
| #define PACKAGE_STRING "glib 2.14.1"
| #define GLIB_MAJOR_VERSION 2
| #define GLIB_MINOR_VERSION 14
| #define GLIB_MICRO_VERSION 1
| #define GLIB_INTERFACE_AGE 1
| #define GLIB_BINARY_AGE 1401
| #define HAVE_CARBON 1
| #define NEED_ICONV_CACHE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_LC_MESSAGES 1
| /* end confdefs.h.  */
|
| #include <libintl.h>
|
| int
| main ()
| {
| return !ngettext ("","", 1)
|   ;
|   return 0;
| }
configure:8720: result: no


No matter what I try, I run into this same problem. Tried building with gcc3.3, gcc4.0, sending arguments to find gettext and trying to discover what linker flags might make it go - all always end up with this same exact error. I get that's it's a linker issue, running into an undefined symbol (_libintl_ngettext), but isn't that supposed to be in gettext?

What piece of the puzzle am I missing??? What am I doing wrong???


Dave Stewart
Aqua~Flo Supply (Goleta CA)
dstewart at aquaflo dot com



Marius
--
Marius Schamschula
Webmaster

The Huntsville Macintosh Users Group

webmaster at hmug dot org
marius at schamschula dot com






Dave Stewart

Aqua~Flo Supply (Goleta CA)

dstewart at aquaflo dot com


A diplomat is someone who can "tell you where to go"

and make you feel happy to be on your way.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]