info-inventor-dev
[Top] [All Lists]

Re: undefined reference to `__ctype_b'

To: Gildardo Sanchez <ante@xxxxxxxxxxxxxxx>
Subject: Re: undefined reference to `__ctype_b'
From: Mark Goodwin <markgw@xxxxxxx>
Date: Mon, 24 May 2004 11:53:31 +1000 (EST)
Cc: info-inventor-dev@xxxxxxxxxxx
In-reply-to: <1085362268.8754.3.camel@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: info-inventor-dev-bounce@xxxxxxxxxxx
On Mon, 24 May 2004, Gildardo Sanchez wrote:
> 
> I just upgraded my computer to Fedora Core 2. However, when I tried to
> compile inventor-2.1.5-10, I got the error:
> /usr/bin/g++  -L/usr/local///usr/lib  -L/usr/X11R6/lib  Main.o
> ClassDef.o Man.o Reader.o Writer.o BuildIssues.o           -lInventor 
> -o ivman
> /usr/local///usr/lib/libInventor.so: undefined reference to `__ctype_b'
> 
> I saw some comments regarding this problem, but still cannot compile.
> Does anybody how to get OpenInventor working when this happens?

The problem is libFL.a was built with gcc 2.96 / glibc 2.2.x. The following
patch works for ia64 RH/AS3.x, and will quite likely work on recent fedora
on i386 too. After applying the patch, "make rpms" should now produce both
binary and src RPMs.

-- Mark


diff -uNr inventor.orig/GNUmakefile inventor/GNUmakefile
--- inventor.orig/GNUmakefile   Sat Mar 24 13:47:41 2001
+++ inventor/GNUmakefile        Wed May 19 14:42:27 2004
@@ -23,5 +23,5 @@
        su -c "cp -f ../$(TARBALL) /usr/src/redhat/SOURCES"
 
        for s in $(SPECS); do \
-         (su -c "cd build; rpm -bb $$s") \
+         (su -c "cd build; rpmbuild -ba $$s") \
        done;
diff -uNr inventor.orig/build/sgi-OpenInventor-clients.rpm.spec 
inventor/build/sgi-OpenInventor-clients.rpm.spec
--- inventor.orig/build/sgi-OpenInventor-clients.rpm.spec       Fri Oct  6 
05:33:20 2000
+++ inventor/build/sgi-OpenInventor-clients.rpm.spec    Thu May 20 13:57:23 2004
@@ -5,6 +5,10 @@
 Packager: Silicon Graphics, Inc.
 Source: oiv.tar.gz
 
+BuildRoot: %{_tmppath}/sgi-OpenInventor-root
+%define _unpackaged_files_terminate_build 0
+%define _missing_doc_files_terminate_build 0
+
 #
 # Change the following as appropriate.
 #
@@ -41,8 +45,10 @@
 %setup -n inventor
 
 %build
-make clobber
-make install
+R=/var/tmp/sgi-OpenInventor-root
+rm -rf $R
+make IVROOT=$R clobber
+make IVROOT=$R install
 
 %post
 type1=/usr/lib/X11/fonts/Type1
diff -uNr inventor.orig/build/sgi-OpenInventor-data.rpm.spec 
inventor/build/sgi-OpenInventor-data.rpm.spec
--- inventor.orig/build/sgi-OpenInventor-data.rpm.spec  Mon Sep 18 19:01:03 2000
+++ inventor/build/sgi-OpenInventor-data.rpm.spec       Thu May 20 13:57:32 2004
@@ -5,6 +5,10 @@
 Packager: Silicon Graphics, Inc.
 Source: oiv.tar.gz
 
+BuildRoot: %{_tmppath}/sgi-OpenInventor-root
+%define _unpackaged_files_terminate_build 0
+%define _missing_doc_files_terminate_build 0 
+
 #
 # Change the following as appropriate.
 #
@@ -41,7 +45,10 @@
 
 %build
 export LSUBDIRS=data
-make -e install
+R=/var/tmp/sgi-OpenInventor-root
+rm -rf $R
+make IVROOT=$R clobber
+make IVROOT=$R -e install
 
 %files
 %attr(-, root, root) %dir /usr/share/data
diff -uNr inventor.orig/build/sgi-OpenInventor-devel.rpm.spec 
inventor/build/sgi-OpenInventor-devel.rpm.spec
--- inventor.orig/build/sgi-OpenInventor-devel.rpm.spec Fri Oct  6 05:33:20 2000
+++ inventor/build/sgi-OpenInventor-devel.rpm.spec      Thu May 20 13:57:40 2004
@@ -5,6 +5,10 @@
 Packager: Silicon Graphics, Inc.
 Source: oiv.tar.gz
 
+BuildRoot: %{_tmppath}/sgi-OpenInventor-root
+%define _unpackaged_files_terminate_build 0
+%define _missing_doc_files_terminate_build 0 
+
 #
 # Change the following as appropriate.
 #
@@ -43,8 +47,10 @@
 
 %build
 export LIBTYPE=debug
-make clobber
-make install
+R=/var/tmp/sgi-OpenInventor-root
+rm -rf $R
+make IVROOT=$R clobber
+make IVROOT=$R install
 
 %post
 type1=/usr/lib/X11/fonts/Type1
diff -uNr inventor.orig/libFL/GNUmakefile inventor/libFL/GNUmakefile
--- inventor.orig/libFL/GNUmakefile     Fri May 18 06:57:20 2001
+++ inventor/libFL/GNUmakefile  Thu May 20 10:37:59 2004
@@ -3,7 +3,7 @@
 
 SUBDIRS = src
 ifdef FREETYPE
-SUBDIRS = freetype
+SUBDIRS = ang
 endif
 
 all install: link
diff -uNr inventor.orig/make/ivcommonrules inventor/make/ivcommonrules
--- inventor.orig/make/ivcommonrules    Sat Jul 12 08:40:54 2003
+++ inventor/make/ivcommonrules Thu May 20 14:53:59 2004
@@ -53,7 +53,7 @@
 .SUFFIXES: .ivm .3iv
 
 .ivm.3iv:
-       (cd .. && $(IVMAN) `$(MAKEMANDIRS) $(*F)`) > $@
+       (cd .. && LD_LIBRARY_PATH=$(IVLIBDIR):DEFAULT $(IVMAN) `$(MAKEMANDIRS) 
$(*F)`) > $@
 
 MAN3PAGES = $(IVMFILES:.ivm=.3iv)
 
diff -uNr inventor.orig/make/system inventor/make/system
--- inventor.orig/make/system   Sat Jul 12 08:40:54 2003
+++ inventor/make/system        Fri May 21 12:10:15 2004
@@ -11,6 +11,7 @@
 
 ifneq (, $(findstring linux, $(UNAME)))
 usingLinux = 1
+FREETYPE = 1
 endif
 
 ifneq (, $(findstring freebsd, $(UNAME)))



<Prev in Thread] Current Thread [Next in Thread>