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

Re: Re: undefined reference to `__ctype_b'

To: info-inventor-dev@xxxxxxxxxxx
Subject: Re: Re: undefined reference to `__ctype_b'
From: Fangtu Qiu <qiu@xxxxxxx>
Date: Wed, 01 Mar 2006 00:02:48 -0500
In-reply-to: <Pine.LNX.4.44.0405241145100.22656-100000@xxxxxxxxxxxxxxxxxxxxxxxxx>
References: <Pine.LNX.4.44.0405241145100.22656-100000@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: info-inventor-dev-bounce@xxxxxxxxxxx
User-agent: Thunderbird 1.5 (Windows/20051201)
In Fedora Core 3 (4 ?), we are not allowed to #include <freetype/freetype.h> directly. I made the following patch which allowed me to successfully make rpm packages from the current CVS source tree version 2.1.5-11. After applying the patch, enter
sub dir "build" and type "make rpms".

Fangtu

diff -Nur inventor.orig/libFL/ang/flfreetype.h inventor/libFL/ang/flfreetype.h --- inventor.orig/libFL/ang/flfreetype.h 2001-03-23 21:34:24.000000000 -0500
+++ inventor/libFL/ang/flfreetype.h    2006-02-28 20:37:18.000000000 -0500
@@ -1,7 +1,8 @@
#ifndef __flfreetype_h_
#define __flfreetype_h_

-#include <freetype/freetype.h>
+#include <ft2build.h>
+#include FT_FREETYPE_H

#ifndef __fl_h_
#include "fl.h"
diff -Nur inventor.orig/libFL/GNUmakefile inventor/libFL/GNUmakefile
--- inventor.orig/libFL/GNUmakefile    2001-05-17 16:57:20.000000000 -0400
+++ inventor/libFL/GNUmakefile    2006-02-28 20:35:24.000000000 -0500
@@ -3,7 +3,7 @@

SUBDIRS = src
ifdef FREETYPE
-SUBDIRS = freetype
+SUBDIRS = ang
endif

all install: link





Mark Goodwin wrote:
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>
  • Re: Re: undefined reference to `__ctype_b', Fangtu Qiu <=