Mac OS X on linking: "multiple definitions"

Help
2004-03-21
2012-12-13
  • Self compiling tora on Mac OS X (10.3.2) using "README.OSX" instruction ...

    I have no idea, what is going wrong ... any idea? Thanx!

    Linking tora-static
    ld: multiple definitions of symbol _SSLAddDistinguishedName
    /System/Library/Frameworks/Security.framework/Versions/A/Security(single module) definition of _SSLAddDistinguishedName
    /g_opt/oracle/rdbms/lib/libclntst9.a(sslctx.o) definition of _SSLAddDistinguishedName in section (__TEXT,__text)
    ld: multiple definitions of symbol _SSLGetNegotiatedCipher
    /System/Library/Frameworks/Security.framework/Versions/A/Security(single module) definition of _SSLGetNegotiatedCipher
    /g_opt/oracle/rdbms/lib/libclntst9.a(sslctx.o) definition of _SSLGetNegotiatedCipher in section (__TEXT,__text)
    ld: multiple definitions of symbol _SSLGetProtocolVersion
    /System/Library/Frameworks/Security.framework/Versions/A/Security(single module) definition of _SSLGetProtocolVersion
    /g_opt/oracle/rdbms/lib/libclntst9.a(sslctx.o) definition of _SSLGetProtocolVersion in section (__TEXT,__text)
    ld: multiple definitions of symbol _SSLSetPeerID
    /System/Library/Frameworks/Security.framework/Versions/A/Security(single module) definition of _SSLSetPeerID
    /g_opt/oracle/rdbms/lib/libclntst9.a(sslctx.o) definition of _SSLSetPeerID in section (__TEXT,__text)
    ld: multiple definitions of symbol _SSLSetProtocolVersion
    /System/Library/Frameworks/Security.framework/Versions/A/Security(single module) definition of _SSLSetProtocolVersion
    /g_opt/oracle/rdbms/lib/libclntst9.a(sslctx.o) definition of _SSLSetProtocolVersion in section (__TEXT,__text)
    ld: multiple definitions of symbol _SSLClose
    /System/Library/Frameworks/Security.framework/Versions/A/Security(single module) definition of _SSLClose
    /g_opt/oracle/rdbms/lib/libclntst9.a(ssltrspt.o) definition of _SSLClose in section (__TEXT,__text)
    ld: multiple definitions of symbol _SSLHandshake
    /System/Library/Frameworks/Security.framework/Versions/A/Security(single module) definition of _SSLHandshake
    /g_opt/oracle/rdbms/lib/libclntst9.a(ssltrspt.o) definition of _SSLHandshake in section (__TEXT,__text)
    ld: multiple definitions of symbol _SSLRead
    /System/Library/Frameworks/Security.framework/Versions/A/Security(single module) definition of _SSLRead
    /g_opt/oracle/rdbms/lib/libclntst9.a(ssltrspt.o) definition of _SSLRead in section (__TEXT,__text)
    ld: multiple definitions of symbol _SSLWrite
    /System/Library/Frameworks/Security.framework/Versions/A/Security(single module) definition of _SSLWrite
    /g_opt/oracle/rdbms/lib/libclntst9.a(ssltrspt.o) definition of _SSLWrite in section (__TEXT,__text)
    make: *** [tora-static] Error 1

     
    • Mark Smith
      Mark Smith
      2004-05-27

      I get this problem too. I'm trying to work out what's going wrong:

      As I understand it, oracle has an implementation of SSL, and so does the security framework. However, I don't know how the security framework is being included. I also don't know how to tell the _static_ linker to use just the first occurance of the symbol, or something similar.

      If you are doing dynamic linking, then it seems you can use -bind_at_load and -multiply_defined warning and then it all works out at run time.

      I tried hacking the oracle library by taking out the .o's in question:
      a) cp libclntst9.a libclntst9ns.a
      b) ar -d libclntst9ns.a ssltrspt.o
      c) ar -d libclntst9ns.a sslctx.o
      d) ranlib libclntst9ns.a

      But that didn't work. I then got a bunch of undefined symbols. Which is fair enough. It was a stupid, desperate thing to do.

      So questions remain:
      1. how to get the static linker to ignore/accept the multiple symbols
      2. Should we just link dynamically? if so, how do we get the linker/compiler to do that?

      Cheers,

      ideapod

       
    • Jay Colson
      Jay Colson
      2004-08-12

      which version of tora are you trying to compile?

       
    • Alan Sill
      Alan Sill
      2004-08-15

      I decided to try to build a dynamically linked version of the latest test release (tora-1.3.14.1) as follows:

      1) Instead of using the supplied Makefile.OSX, I generated a new Makefile using ./configure

      2) I edited the resulting Makefile to try to patch in the relevant pieces from Makefile.OSX, but rpeserving the shared instead of the static links.

      Here it is:

      ############################################################################
      #
      # tora - For DBA's and developers
      # Copyright (C) 2003 Quest Software, Inc
      #
      # This program is free software; you can redistribute it and/or
      # modify it under the terms of the GNU General Public License
      # as published by the Free Software Foundation;  only version 2 of
      # the License is valid for this program.
      #
      # This program is distributed in the hope that it will be useful,
      # but WITHOUT ANY WARRANTY; without even the implied warranty of
      # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      # GNU General Public License for more details.
      #
      # You should have received a copy of the GNU General Public License
      # along with this program; if not, write to the Free Software
      # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
      #
      #      As a special exception, you have permission to link this program
      #      with the Oracle Client libraries and distribute executables, as long
      #      as you follow the requirements of the GNU GPL in regard to all of the
      #      software in the executable aside from Oracle client libraries.
      #
      #      Specifically you are not permitted to link this program with the
      #      Qt/UNIX, Qt/Windows or Qt Non Commercial products of TrollTech.
      #      And you are not permitted to distribute binaries compiled against
      #      these libraries without written consent from Quest Software, Inc.
      #      Observe that this does not disallow linking to the Qt Free Edition.
      #
      # All trademarks belong to their respective owners.
      #
      ############################################################################

      # Customized Makefile for shared MacOS X build

      # Mac application directory
      MAC_APP_DIR = tora.app

      # Mac application contents directory
      CONTENTS_DIR = $(MAC_APP_DIR)/Contents

      # Mac binary location
      DESTDIR  = $(CONTENTS_DIR)/MacOS

      # Mac resources location
      RSCSDIR  = $(CONTENTS_DIR)/Resources

      # Directory for Qt-based help (as opposed to native MacOS help)
      HELPDIR  = $(RSCSDIR)/help

      # Additional includes needed to compile program
      INCLUDES="-I$(QTDIR)/mkspecs/macx-g++" "-I$(ORACLE_HOME)/rdbms/demo" "-I$(ORACLE_HOME)/plsql/public" "-I$(ORACLE_HOME)/rdbms/public" "-I$(ORACLE_HOME)/network/public" "-I$(ORACLE_HOME)/lib" "-I$(QTDIR)/include"

      # C++ Compiler to use
      GCC="/sw/bin/g++"

      # Additional libraries to link with
      LIBS_GLOB=-lm -framework Carbon -framework QuickTime -lz -framework OpenGL -framework AGL

      # Standard C++ library
      STDCPP_SHARED=-lstdc++

      # Static version of C++ library (Only needed when linking statically
      STDCPP_STATIC=

      # Qt library
      QT_SHARED= -lqt -lqui

      # Static Qt library
      QT_STATIC=

      # Path to Qt meta compiler
      MOC="$(QTDIR)/bin/moc"

      # Path to Qt interface compiler
      UIC="$(QTDIR)/bin/uic"

      # Path to Qt translation compiler
      LRELEASE="$(QTDIR)/bin/lrelease"

      # Path to Qt translation update
      LUPDATE="$(QTDIR)/bin/lupdate"

      # Additional paths to find libraries
      LFLAGS="-L$(ORACLE_HOME)/rdbms/lib" "-L$(QTDIR)/lib"

      # Oracle library
      ORACLE_SHARED=-lclntsh

      # Static Oracle libraries
      ORACLE_STATIC=$(STATIC_ORACLETTLIBS)

      # Oracle home path
      ORACLE_HOME=/Users/alansill/orahome10g

      # What to compile, can be tora for plugin version, tora-mono for monolithic, tora-static for static version
      TARGET=tora-mono

      # Static MySQL libraries
      MYSQL_STATIC=

      # Base directory of KDE installation
      KDE_BASE=$(ROOT)

      # Additional defines to use while compiling, except for the normal these are available
      #   OTL_ORA9I          - Compile for Oracle 9.x
      #   OTL_ORA8I          - Compile for Oracle 8.1.x
      #   OTL_ORA8           - Compile for Oracle 8.0.x
      #   OTL_ORA_TIMESTAMP  - Include support for timestamps
      #   TO_NEW_CHECK       - Disable new version check globally
      #   TO_KDE             - Compile as KDE application
      DEFINES+=-DOTL_ORA9I -DOTL_ORA_TIMESTAMP -DOTL_ANSI_CPP
      DEFINES+=-D_REENTRANT -DDEFAULT_PLUGIN_DIR=\"$(INSTALLLIB)/tora\"
      DEFINES+=-DTOMONOLITHIC
      #DEFINES+=-DQT_THREAD_SUPPORT
      DEFINES+=-DQT_NO_DEBUG

      # Where to find perl on your system
      PERL=/usr/bin/perl

      # Comment out this line if you want more output from compile
      .SILENT:

      # Additional flags set when using only the precompiler.
      CPPFLAGS_GLOB=

      # Additional flags to set when linking.
      LFLAGS_GLOB=-g -O3 -bind_at_load

      # Additional flags set when compiling.
      CFLAGS_GLOB=-g -O3 -fPIC -W -Wall

      ############################################################################
      #
      # End of configuration part of Makefile
      #
      ############################################################################

      TITLE=tora

      API=    \     tochangeconnection.h    \     tobackground.h        \     tobarchart.h        \     toconf.h        \     toconnection.h        \     todatatype.h        \     todefaultkeywords.h    \     toeditwidget.h        \     toextract.h        \     tofilesize.h        \     tohelp.h        \     tohelpbrowser.h        \     tohighlightedtext.h    \     tohtml.h        \     tolegendchart.h        \     tolinechart.h        \     tomain.h        \     tomainwindow.kde.h    \     tomarkedtext.2.h    \     tomarkedtext.h        \     tomemoeditor.h        \     tonoblockquery.h    \     toparamget.h        \     topiechart.h        \     toqvalue.h        \     toreport.h              \     toresult.h        \     toresultbar.h        \     toresultcols.h        \     toresultcombo.h         \     toresultconstraint.h    \     toresultcontent.h    \     toresultdepend.h    \     toresultfield.h        \     toresultindexes.h    \     toresultitem.h        \     toresultlabel.h        \     toresultline.h        \     toresultlong.h        \     toresultpie.h        \     toresultplan.h        \     toresultreferences.h    \     toresultresources.h    \     toresultstats.h        \     toresultview.h        \     tosgastatement.h    \     tosmtp.h                \     tosql.h            \     tosqlparse.h        \     totabwidget.h        \     totemplate.h        \     totextview.h            \     tothread.h        \     totool.h        \     tovisualize.h        \     utils.h

      SOURCES=\     toabout.cpp \     toaboutui.cpp \     toalert.cpp \     toanalyze.cpp \     tobackground.cpp \     tobackup.cpp \     tobarchart.cpp \     tobrowser.cpp \     tobrowserconstraint.cpp \     tobrowserconstraintui.cpp \     tobrowserfilterui.cpp \     tobrowserindex.cpp \     tobrowserindexui.cpp \     tobrowsertable.cpp \     tobrowsertableui.cpp \     tochangeconnection.cpp \     tochartalarmui.cpp \     tochartmanager.cpp \     tochartsetupui.cpp \     toconnection.cpp \     tocurrent.cpp \     todatabasesettingui.cpp \     todatatype.cpp \     todebug.cpp \     todebugchangeui.cpp \     todebugtext.cpp \     todebugwatch.cpp \     toeditextensiongotoui.cpp \     toeditextensions.cpp \     toeditextensionsetupui.cpp \     toeditwidget.cpp \     toextract.cpp \     tofilesize.cpp \     toglobalsetting.cpp \     toglobalsettingui.cpp \     tohelp.cpp \     tohelpaddfileui.cpp \     tohelpsetupui.cpp \     tohighlightedtext.cpp \     tohtml.cpp \     toinvalid.cpp \     tolegendchart.cpp \     tolinechart.cpp \     tolinechartsetupui.cpp \     tomain.cpp \     tomarkedtext.cpp \     tomemoeditor.cpp \     tomessageui.cpp \     tonewconnection.cpp \     tonewconnectionui.cpp \     tonoblockquery.cpp \     tooracleconnection.cpp \     tooracleextract.cpp \     tooraclepreload.cpp \     tooraclesettingui.cpp \     tooutput.cpp \     toparamget.cpp \     topassword.cpp \     topiechart.cpp \     topreferences.cpp \     topreferencesui.cpp \     toprofiler.cpp \     toproject.cpp \     toqsqlconnection.cpp \     toreport.cpp \     toresult.cpp \     toresultbar.cpp \     toresultcols.cpp \     toresultcombo.cpp \     toresultconstraint.cpp \     toresultcontent.cpp \     toresultcontentfilterui.cpp \     toresultdepend.cpp \     toresultextract.cpp \     toresultfield.cpp \     toresultindexes.cpp \     toresultitem.cpp \     toresultlabel.cpp \     toresultline.cpp \     toresultlistformatui.cpp \     toresultlock.cpp \     toresultlong.cpp \     toresultparam.cpp \     toresultpie.cpp \     toresultplan.cpp \     toresultreferences.cpp \     toresultstats.cpp \     toresultstorage.cpp \     toresultview.cpp \     torollback.cpp \     torollbackdialogui.cpp \     toscript.cpp \     toscriptui.cpp \     tosearchreplace.cpp \     tosearchreplaceui.cpp \     tosecurity.cpp \     tosecurityquotaui.cpp \     tosecurityroleui.cpp \     tosecurityuserui.cpp \     tosession.cpp \     tosgastatement.cpp \     tosgatrace.cpp \     tosmtp.cpp \     tosql.cpp \     tosqledit.cpp \     tosqlparse.cpp \     tostorage.cpp \     tostoragedatafileui.cpp \     tostoragedefinition.cpp \     tostoragedefinitionui.cpp \     tostoragedialogui.cpp \     tostorageprefsui.cpp \     tostoragetablespaceui.cpp \     tosyntaxsetup.cpp \     tosyntaxsetupui.cpp \     totableselect.cpp \     totabwidget.cpp \     totemplate.cpp \     totemplateaddfileui.cpp \     totemplateeditui.cpp \     totemplateprovider.cpp \     totemplatesetupui.cpp \     totemporary.cpp \     totextview.cpp \     tothread.cpp \     totool.cpp \     totoolsettingui.cpp \     totuning.cpp \     totuningoverviewui.cpp \     totuningsettingui.cpp \     tovisualize.cpp \     towaitevents.cpp \     toworksheet.cpp \     toworksheetsetupui.cpp \     toworksheetstatistic.cpp \     utils.cpp

      default: all
      include $(ORACLE_HOME)/rdbms/lib/env_rdbms.mk

      TRANSLATIONS=\     tora_se.ts\     tora_fr.ts\     tora_it.ts\

      CPPFLAGS=$(CPPFLAGS_GLOB) $(DEFINES) $(INCLUDES)
      CFLAGS=$(CFLAGS_GLOB) $(INCLUDES) $(DEFINES)

      OBJECTS=$(filter %.o,$(SOURCES:%.cpp=objs/%.o))
      TRANSOBJ=$(filter %.qm,$(TRANSLATIONS:%.ts=%.qm))

      DEPENDS=$(filter %.d,$(SOURCES:%.cpp=.depends/%.d)) .depends/main.d

      vpath %.h $(INCLUDE)

      .PHONY: all clean fixmod install distclean

      all: $(MAC_TARGET) lrelease

      #$(OBJECTS): Makefile Makefile.common

      .depends/%.d: %.cpp
          @echo Making dependencies for $<
          if [ ! -d .depends ] ; then mkdir -p .depends ; fi
          $(GCC) -MM $(CPPFLAGS) $< > $@.tmp && \         ( sed "s/^\(.*\.\)o\([ :]*\)/objs\/\1o \         $(subst /,\\/,$@)\2/g" < $@.tmp > $@ ; rm -f $@.tmp )

      include $(DEPENDS)

      %.moc: %.h
          @echo Metacompiling $<
          $(MOC) -o $@ $<

      %.cpp %.h: %.ui
          @echo Generating $(<:%.ui=%.cpp) \&amp; $(<:%.ui=%.h)
          $(UIC) -o $(<:%.ui=%.h) $<
          $(UIC) -i $(<:%.ui=%.h) -o  $(<:%.ui=%.cpp) $<

      plugins/%.tso:
          @echo Linking plugin $@
          if [ ! -d plugins ] ; then mkdir -p plugins ; fi
          $(GCC) -shared $(LFLAGS) $(LFLAGS_GLOB) $(CFLAGS) $(QT_SHARED) -o $@ $^

      objs/%.o: %.cpp
          @echo Compiling $<
          if [ ! -d objs ] ; then mkdir -p objs ; fi
          $(GCC) $(CFLAGS) -o $@ -c $<

      %.o : objs/%.o
          @echo Faulty dependency, forgot the objs/ part

      $(MAC_TARGET):  $(TARGET) \         $(CONTENTS_DIR)/Info.plist \         $(CONTENTS_DIR)/PkgInfo \         $(HELPDIR) \         install-common
          test -d $(DESTDIR)/ || mkdir -p $(DESTDIR)/
          -cp -p $(TARGET) $(DESTDIR)/tora

      $(CONTENTS_DIR)/PkgInfo:
          @test -d $(CONTENTS_DIR)/ || mkdir -p $(CONTENTS_DIR)/
          -rm -fr $(CONTENTS_DIR)/PkgInfo >/dev/null 2>&1
          @echo "APPL????" > $(CONTENTS_DIR)/PkgInfo

      $(CONTENTS_DIR)/Info.plist:
          @test -d $(CONTENTS_DIR)/ || mkdir -p $(CONTENTS_DIR)/
          -rm -fr $(CONTENTS_DIR)/Info.plist >/dev/null 2>&1
          @sed -e "s,@ICON@,application.icns,g" -e "s,@EXECUTABLE@,tora,g" $(QTDIR)/mkspecs/macx-g++/Info.plist.app > $(CONTENTS_DIR)/Info.plist

      $(HELPDIR):
          @test -d $(RSCSDIR)/ || mkdir -p $(RSCSDIR)/
          -cp -pr help $(RSCSDIR)/

      install-common: lrelease
          @test -d $(RSCSDIR)/ || mkdir -p $(RSCSDIR)/
          -cp icons/tora.xpm $(RSCSDIR)/ >/dev/null 2>&1
          -cp templates/*.tpl $(RSCSDIR)/ >/dev/null 2>&1
          -cp  *.qm $(RSCSDIR)/ >/dev/null 2>&1

      install: $(TARGET) install-common install-kde
          @echo Install $(TARGET) to $(INSTALLBIN)
          if [ \! -f $(TARGET) ] ; then cp tora $(TARGET) ; fi
          -strip $(TARGET) plugins/* >/dev/null 2>&1
          cp $(TARGET) $(INSTALLBIN)/tora
          if [ -f tora-plugin ] ; \         then cp $(TARGET) $(INSTALLBIN)/tora ; \         rm -f tora-plugin ; \     else cp $(TARGET) $(INSTALLBIN)/tora.real ; \         cp rpm/tora.sh $(INSTALLBIN)/tora ; \     fi
          rm -f $(INSTALLLIB)/tora/*.tso
          -cp plugins/* $(INSTALLLIB)/tora >/dev/null 2>&1

      install-debug: tora-mono install-common
          @echo Install tora with debugging symbols to $(INSTALLBIN)
          cp tora-mono $(INSTALLBIN)/tora

      install-kde:
          true # Nop

      clean:
          @echo Cleaning $(TITLE)
          -rm -rf objs tora tora-static tora-mono >/dev/null 2>&1
          -rm -f *~ >/dev/null 2>&1
          -rm -f *~ */*~ >/dev/null 2>&1
          -rm -f *.bak >/dev/null 2>&1
          -rm -rf plugins >/dev/null 2>&1
          -rm -rf $(MAC_APP_DIR)
          -for a in *.ui ; \              do rm -f `$(PERL) -e '$$_=shift(@ARGV); s/\.[^\.]*$$//; print "$$_.h\n$$_.cpp";' $$a`; \          done

      distclean: clean
          -rm -rf .depends >/dev/null 2>&1
          -rm -rf .xvpics >/dev/null 2>&1
          -rm -rf icons/.xvpics >/dev/null 2>&1
          -rm -f *.moc qtlegacy/*.moc >/dev/null 2>&1
          -rm -f rpmcommon rpmoracle rpmmysql >/dev/null 2>&1
          -rm -f \#*\# >/dev/null 2>&1
          -rm -f LICENSE.h >/dev/null 2>&1
          -rm -f configure.setup >/dev/null 2>&1

      # Plugin definitions

      plugins/toalert.tso:\     objs/toalert.o
      plugins/toanalyze.tso:\     objs/toanalyze.o \     objs/toworksheetstatistic.o
      plugins/tobackup.tso:\     objs/tobackup.o
      plugins/tobrowser.tso:\     objs/tobrowser.o \     objs/tobrowserconstraint.o \     objs/tobrowserconstraintui.o \     objs/tobrowserfilterui.o \     objs/tobrowserindex.o \     objs/tobrowserindexui.o \     objs/tobrowsertable.o \     objs/tobrowsertableui.o
      plugins/tochart.tso:\     objs/tobarchart.o \     objs/tochartalarmui.o \     objs/tochartmanager.o \     objs/tochartsetupui.o \     objs/tolegendchart.o \     objs/tolinechart.o \     objs/tolinechartsetupui.o \     objs/topiechart.o \     objs/toresultbar.o \     objs/toresultline.o \     objs/toresultpie.o
      plugins/tocurrent.tso:\     objs/tocurrent.o
      plugins/todebug.tso:\     objs/todebug.o \     objs/todebugwatch.o \     objs/todebugtext.o \     objs/todebugchangeui.o
      plugins/toeditextensions.tso:\     objs/toeditextensions.o \     objs/toeditextensiongotoui.o \     objs/toeditextensionsetupui.o
      plugins/toextract.tso:\     objs/todatatype.o \     objs/toextract.o \     objs/toreport.o \     objs/toresultconstraint.o \     objs/toresultextract.o
      plugins/toinvalid.tso:\     objs/toinvalid.o
      plugins/tooracleconnection.tso:\     objs/tooracleconnection.o \     objs/tooracleextract.o \     objs/tooraclesettingui.o
          @echo Linking plugin $@
          if [ ! -d plugins ] ; then mkdir -p plugins ; fi
          $(GCC) -shared $(CFLAGS) $(LFLAGS) $(LFLAGS_GLOB) -o $@ $^ $(ORACLE_SHARED)
      plugins/tooraclepreload.tso:\     objs/tooraclepreload.o
      plugins/tooutput.tso:\     objs/tooutput.o
      plugins/topassword.tso:\     objs/topassword.o
      plugins/toprofiler.tso:\     objs/toprofiler.o
      plugins/toproject.tso:\     objs/toproject.o
      plugins/toqsqlconnection.tso:\     objs/toqsqlconnection.o
      plugins/toresult.tso:\     objs/toresultcols.o \     objs/toresultcombo.o \     objs/toresultcontent.o \     objs/toresultcontentfilterui.o \     objs/toresultdepend.o \     objs/toresultindexes.o \     objs/toresultlabel.o \     objs/toresultlock.o \     objs/toresultlong.o \     objs/toresultplan.o \     objs/toresultparam.o \     objs/toresultreferences.o \     objs/toresultstorage.o
      plugins/torollback.tso:\     objs/torollback.o \     objs/torollbackdialogui.o
      plugins/toscript.tso:\     objs/toscript.o \     objs/toscriptui.o
      plugins/tosecurity.tso:\     objs/tosecurity.o \     objs/tosecurityquotaui.o \     objs/tosecurityroleui.o \     objs/tosecurityuserui.o
      plugins/tosession.tso:\     objs/tosession.o
      plugins/tosgatrace.tso:\     objs/tosgatrace.o
      plugins/tosqledit.tso:\     objs/tosqledit.o
      plugins/tostorage.tso:\     objs/tostorage.o \     objs/tostoragedatafileui.o \     objs/tostoragedialogui.o \     objs/tostorageprefsui.o \     objs/tostoragetablespaceui.o
      plugins/tostoragedefinition.tso:\     objs/tostoragedefinition.o \     objs/tostoragedefinitionui.o
      plugins/totemplate.tso:\     objs/totemplate.o \     objs/totemplateaddfileui.o \     objs/totemplateeditui.o \     objs/totemplatesetupui.o
      plugins/totemporary.tso:\     objs/totemporary.o
      plugins/totuning.tso:\     objs/totuning.o \     objs/totuningoverviewui.o \     objs/totuningsettingui.o
      plugins/towidget.tso:\     objs/tochangeconnection.o \     objs/tofilesize.o \     objs/tosgastatement.o \     objs/totableselect.o \     objs/tovisualize.o \     objs/towaitevents.o
      plugins/toworksheet.tso:\     objs/toworksheet.o \     objs/toworksheetsetupui.o

      # Plugin based binary and its plugins

      tora-plugin:\     tora \     plugins/toalert.tso \     plugins/toanalyze.tso \     plugins/tobackup.tso \     plugins/tobrowser.tso \     plugins/tochart.tso \     plugins/tocurrent.tso \     plugins/todebug.tso \     plugins/toeditextensions.tso \     plugins/toextract.tso \     plugins/toinvalid.tso \     plugins/tooracleconnection.tso \     plugins/tooraclepreload.tso \     plugins/tooutput.tso \     plugins/topassword.tso \     plugins/toprofiler.tso \     plugins/toproject.tso \     plugins/toqsqlconnection.tso \     plugins/toresult.tso \     plugins/torollback.tso \     plugins/toscript.tso \     plugins/tosecurity.tso \     plugins/tosession.tso \     plugins/tosgatrace.tso \     plugins/tosqledit.tso \     plugins/tostorage.tso \     plugins/tostoragedefinition.tso \     plugins/totemplate.tso \     plugins/totemporary.tso \     plugins/totuning.tso \     plugins/towidget.tso \     plugins/toworksheet.tso
      # Keyboard shortcuts

      main.cpp: tora_toad.h

      tora_toad.h: tora_toad.qm
          $(PERL) chex.pl < $< > $@

      tora_toad.qm: tora_toad.ts
          $(LRELEASE) $<

      # Monolithic target, for non ELF platforms

      tora-mono: $(OBJECTS) main.cpp
          @echo Linking $@
          $(GCC) $(CFLAGS) $(LFLAGS) $(LFLAGS_GLOB) -DTOMONOLITHIC -o $@ $(OBJECTS) main.cpp \         $(LIBS_GLOB) $(STDCPP_SHARED) $(ORACLE_SHARED) $(QT_SHARED)

      # The binary for the pluginbased tora

      tora.pro: Makefile
          echo "# Not indended to be used for anything except lupdate" > tora.pro
          echo 'SOURCES=    license/tolicense.cpp\' >> tora.pro
          echo '    license/tolicenseui.cpp\' >> tora.pro
          echo '    main.cpp\' >> tora.pro
          echo '    toextratranslations.cpp\' >> tora.pro
          echo "    $(SOURCES)" >> tora.pro
          echo 'TRANSLATIONS=$(TRANSLATIONS)' >> tora.pro

      lupdate: tora.pro
          $(LUPDATE) tora.pro

      lrelease: tora.pro $(TRANSLATIONS)
          $(LRELEASE) tora.pro

      tora:\     objs/toabout.o \     objs/toaboutui.o \     objs/tobackground.o \     objs/toconnection.o \     objs/todatabasesettingui.o \     objs/toeditwidget.o \     objs/toglobalsetting.o \     objs/toglobalsettingui.o \     objs/tohelp.o \     objs/tohelpaddfileui.o \     objs/tohelpsetupui.o \     objs/tohighlightedtext.o \     objs/tohtml.o \     objs/tomain.o \     objs/tomarkedtext.o \     objs/tomemoeditor.o \     objs/tomessageui.o \     objs/tonewconnection.o \     objs/tonewconnectionui.o \     objs/tonoblockquery.o \     objs/toparamget.o \     objs/topreferences.o \     objs/topreferencesui.o \     objs/toresult.o \     objs/toresultfield.o \     objs/toresultitem.o \     objs/toresultlistformatui.o \     objs/toresultstats.o \     objs/toresultview.o \     objs/tosearchreplace.o \     objs/tosearchreplaceui.o \     objs/tosmtp.o \     objs/tosql.o \     objs/tosqlparse.o \     objs/tosyntaxsetup.o \     objs/tosyntaxsetupui.o \     objs/totabwidget.o \     objs/totemplateprovider.o \     objs/totextview.o \     objs/tothread.o \     objs/totool.o \     objs/totoolsettingui.o \     objs/utils.o\     main.cpp
          @echo Linking $@
          $(GCC) $(CFLAGS) $(LFLAGS) -Xlinker "--export-dynamic " $(LFLAGS_GLOB) \         -o $@ $^ $(LIBS_GLOB) $(STDCPP_SHARED) $(QT_SHARED)

      OK, sorry for the long post, but I wanted to be clear.

      This _almost_ works.  I am able to make and then make install, but the make install step fails as follows:

      Linking tora-mono
      ld: warning multiple definitions of symbol _ERR_load_strings
      /usr/lib/libcrypto.0.9.7.dylib(err.o) definition of _ERR_load_strings
      /Users/alansill/orahome10g/rdbms/lib/libclntsh.dylib(truntim.o) definition of _ERR_load_strings
      ld: Undefined symbols:
      QWaitCondition::QWaitCondition()
      QWaitCondition::~QWaitCondition()
      QMutex::QMutex(bool)
      QMutex::~QMutex()
      QWaitCondition::wait(QMutex*, unsigned long)
      QWaitCondition::wakeOne()
      QMutex::lock()
      QMutex::unlock()
      QThread::msleep(unsigned long)
      make: *** [tora-mono] Error 1

      Anyone want to try to modify my proposed Makefile.OSX_shared as above, or give hints?

      (I already tried including the libqtwidgets by using -lqtwidgets and including "-L$(QTDIR)/plugins/accessible" in my LFLAGS, but this produced a message saying this dynamic library couldn't be relocated in a static executable, odd because this is supposed to be dynamically linked.)

       
    • MacDeveloper
      MacDeveloper
      2004-10-20

      I have compiled succefully tora on osx/x11/oracle 10g and fink kde distribution, no i will try to compile it under qt for osx without x11, but it work very well on x11 for osx