Bug 83020 - Error when compiling kjsembed in kdebindings (with fix/patch)
Summary: Error when compiling kjsembed in kdebindings (with fix/patch)
Status: RESOLVED FIXED
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-07 23:05 UTC by Stefanos Harhalakis
Modified: 2004-06-12 00:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefanos Harhalakis 2004-06-07 23:05:09 UTC
Version:            (using KDE KDE 3.2.90)
Installed from:    Compiled From Sources
Compiler:          gcc 3.4.0 
OS:                Linux

When trying to compile kdebindings:

make[1]: Entering directory `/tmp2/compile/kde/kdebindings-3.0.8/kjsembed/docs/embedding/simple-embed'
/bin/sh ../../../../libtool --silent --mode=link --tag=CXX g++ -O2 -g0 -fomit-frame-pointer -march=pentium3 -mmmx -I/usr/local/progs/CUPS/include -L/              usr/local/progs/CUPS/lib -I/mnt/extra/usr/local/progs/openldap/include -L/mnt/extra/usr/local/progs/openldap/lib -I/usr/local/ssl/include -L/usr/loca              l/ssl/lib  -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wp              ointer-arith -Wwrite-strings -O2 -O2 -g0 -fomit-frame-pointer -march=pentium3 -mmmx -I/usr/local/progs/CUPS/include -L/usr/local/progs/CUPS/lib -I/mn              t/extra/usr/local/progs/openldap/include -L/mnt/extra/usr/local/progs/openldap/lib -I/usr/local/ssl/include -L/usr/local/ssl/lib -Wformat-security -W              missing-format-attribute -fno-exceptions -fno-check-new -fno-common   -L/usr/local/progs/CUPS/lib -L/mnt/extra/usr/local/progs/openldap/lib -o embedj              s -R /usr/local/kde3.3/lib -R /usr/local/qt-3/lib -R /usr/X11R6/lib -L/usr/X11R6/lib -L/usr/local/qt-3/lib -L/usr/local/kde3.3/lib  main.o embedjs.o               embedjsview.o pref.o embedjsiface_skel.o -lkio -lkdeprint -lkjs -lkjsembed 
/usr/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lkjsembed
collect2: ld returned 1 exit status
make[1]: *** [embedjs] Error 1
make[1]: Leaving directory `/tmp2/compile/kde/kdebindings-3.0.8/kjsembed/docs/embedding/simple-embed'
make: *** [all-recursive] Error 1

This happens because the Makefile.am tries uses -lkjsembed insted of pointing to libkjsembad.la:

# the libraries to link against.
embedjs_LDADD   = $(LIB_KFILE) $(LIB_KDEPRINT) -lkjs -lkjsembed

Which is a problem since it will only compile if there is an installed version of KDE and in that case it will link against the old one.

Trivial patch:

-------------------------------------------------------------------
--- Makefile.am.orig    2004-06-08 00:00:44.000000000 +0300
+++ Makefile.am 2004-06-08 00:03:45.000000000 +0300
@@ -11,7 +11,7 @@
 embedjs_LDFLAGS = $(KDE_RPATH) $(all_libraries)
 
 # the libraries to link against.
-embedjs_LDADD   = $(LIB_KFILE) $(LIB_KDEPRINT) -lkjs -lkjsembed
+embedjs_LDADD   = $(LIB_KFILE) $(LIB_KDEPRINT) -lkjs $(top_builddir)/kjsembed/libkjsembed.la
 
 # which sources should be compiled for embedjs
 embedjs_SOURCES = main.cpp embedjs.cpp embedjsview.cpp \
-------------------------------------------------------------------

TIA

<<V13>>
Comment 1 Richard Moore 2004-06-12 00:45:46 UTC
CVS commit by rich: 

- Disable compilation of the embedding example. This example wasn't
  written to support compilation with the library (something which
  needs addressing). Bug #83020, Bug #82991.

- Added the missing kjs.pro for the qt-only build.

CCMAIL: 83020-done@bugs.kde.org
CCMAIL: 82991-done@bugs.kde.org


  A            kjs.pro   1.1
  M +1 -1      Makefile.am   1.65


--- kdebindings/kjsembed/Makefile.am  #1.64:1.65
@@ -7,5 +7,5 @@
 INCLUDES += -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST
 
-SUBDIRS = bindings builtins qtbindings . plugin plugins docs stdlib cpptests
+SUBDIRS = bindings builtins qtbindings . plugin plugins stdlib cpptests
 
 lib_LTLIBRARIES = libkjsembed.la