Am 26.02.2012 um 00:19 schrieb Sajjad: > Hi > > i ran the suggested diagnostics and found the following result: > > //////////////////////////////////////////////////////////////////////////////////////////////////////////// > sajjad@sajjad:~$ ldd /usr/local/bin/lyx > linux-vdso.so.1 => (0x00007fff853ff000) > libenchant.so.1 => /usr/lib/libenchant.so.1 (0x00007fd3d926b000) > libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007fd3d9067000) > libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007fd3d8da2000) > libz.so.1 => /usr/lib/libz.so.1 (0x00007fd3d8b8a000) > libQtGui.so.4 => not found > libQtCore.so.4 => not found > libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fd3d887d000) > libm.so.6 => /lib/libm.so.6 (0x00007fd3d85f8000) > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007fd3d83e0000) > libc.so.6 => /lib/libc.so.6 (0x00007fd3d806e000) > libpthread.so.0 => /lib/libpthread.so.0 (0x00007fd3d7e52000) > libdl.so.2 => /lib/libdl.so.2 (0x00007fd3d7c4e000) > libpcre.so.3 => /lib/libpcre.so.3 (0x00007fd3d7a25000) > /lib64/ld-linux-x86-64.so.2 (0x00007fd3d9476000) > > > > //////////////////////////////////////////////////////////////////////////////////////////////////////////// > > > It shows that the qt library is not found. As you have seen in the previous > post, the output of the ./configure shows that the qt library is found. While > configuring i did mention the full qt path.
Yes. That's exactly the situation: While configuring you told the compiler where to find your own Qt-Libraries. Your problem is now: you don't tell the runtime-linker where you've put the Qt-Libraries on your machine when running lyx. You have to decide how to solve that. You may 1. add the directory /usr/local/Trolltech/Qt-4.8.0/lib to your system library path You have to become root and add the mentioned path to the file /etc/ld.so.conf and run the command ldconfig 2. add the directory /usr/local/Trolltech/Qt-4.8.0/lib to your user library path You have to add the mentioned directory to the value of LD_LIBRARY_PATH on user login. 3. add the directory /usr/local/Trolltech/Qt-4.8.0/lib to your lyx call. You have to create a shell script and set LD_LIBRARY_PATH there and run lyx from this script. --- example --- #!/bin/sh LD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.8.0/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH exec /path/to/lyx "$@" --- end of example --- Check the man pages for details or google for the explanations for shared library runtime link operation. Stephan > On Sat, Feb 25, 2012 at 9:49 PM, Richard Heck <rgh...@comcast.net> wrote: > On 02/25/2012 08:48 AM, Sajjad wrote: >> Hello >> >> I am using an old machine and repository support went out. I recently >> updated the qt version to 4.8.0 from source. >> >> While configuring the lyx source i am providing wiith the qt path and it did >> not complain at all: >> > This is just a matter of finding the headers. It doesn't have anything to do > with which libraries the system is trying to load when LyX requests them. > Try, as Stephan suggested: > > ldd /path/to/lyx > > Richard > > >> ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> sajjad@sajjad:~/Downloads/LyX/lyx-2.0.0$ ./configure >> --with-qt4-dir='/usr/local/Trolltech/Qt-4.8.0/' >> configuring LyX version 2.0.0 >> checking for build type... release >> checking for version suffix... >> checking build system type... x86_64-unknown-linux-gnu >> checking host system type... x86_64-unknown-linux-gnu >> checking target system type... x86_64-unknown-linux-gnu >> checking what packaging should be used... posix >> checking whether to enable maintainer-specific portions of Makefiles... no >> checking for a BSD-compatible install... /usr/bin/install -c >> checking whether build environment is sane... yes >> checking for a thread-safe mkdir -p... /bin/mkdir -p >> checking for gawk... gawk >> checking whether make sets $(MAKE)... yes >> checking for a Python interpreter with version >= 2.3.4... python >> checking for python... /usr/bin/python >> checking for python version... 2.5 >> checking for python platform... linux2 >> checking for python script directory... ${prefix}/lib/python2.5/site-packages >> checking for python extension module directory... >> ${exec_prefix}/lib/python2.5/site-packages >> checking for style of include used by make... GNU >> checking for gcc... gcc >> checking whether the C compiler works... yes >> checking for C compiler default output file name... a.out >> checking for suffix of executables... >> checking whether we are cross compiling... no >> checking for suffix of object files... o >> checking whether we are using the GNU C compiler... yes >> checking whether gcc accepts -g... yes >> checking for gcc option to accept ISO C89... none needed >> checking dependency style of gcc... gcc3 >> checking how to run the C preprocessor... gcc -E >> checking for grep that handles long lines and -e... /bin/grep >> checking for egrep... /bin/grep -E >> checking for ANSI C header files... yes >> checking for sys/types.h... yes >> checking for sys/stat.h... yes >> checking for stdlib.h... yes >> checking for string.h... yes >> checking for memory.h... yes >> checking for strings.h... yes >> checking for inttypes.h... yes >> checking for stdint.h... yes >> checking for unistd.h... yes >> checking whether byte ordering is bigendian... no >> checking what frontend should be used for the GUI... qt4 >> checking for a good enough C++ compiler... g++ >> checking whether we are using the GNU C++ compiler... yes >> checking whether g++ accepts -g... yes >> checking dependency style of g++... gcc3 >> checking how to run the C++ preprocessor... g++ -E >> checking for gcc... gcc >> checking whether we are using the GNU Objective C compiler... no >> checking whether gcc accepts -g... no >> checking dependency style of gcc... gcc3 >> checking dependency style of gcc... (cached) gcc3 >> checking for extra library directory... NONE >> checking for extra include directory... NONE >> checking for extra lib+include directory... NONE >> checking for main in -lshlwapi... no >> checking for main in -lpsapi... no >> checking for main in -lgdi32... no >> checking whether to use included boost library... yes >> checking whether to use included MyThes library... yes >> checking size of wchar_t... 4 >> checking for ld used by GCC... /usr/bin/ld >> checking if the linker (/usr/bin/ld) is GNU ld... yes >> checking for shared library run path origin... done >> checking for iconv... yes >> checking for iconv declaration... install-shextern size_t iconv (iconv_t cd, >> char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); >> checking zlib.h usability... yes >> checking zlib.h presence... yes >> checking for zlib.h... yes >> checking for gzopen in -lz... yes >> checking for pkg-config... /usr/bin/pkg-config >> checking pkg-config is at least version 0.9.0... yes >> checking for QT4_CORE... yes >> checking for QT4_FRONTEND... yes >> checking for moc-qt4... no >> checking for moc... /usr/local/Trolltech/Qt-4.8.0///bin/moc >> checking for uic-qt4... no >> checking for uic... /usr/local/Trolltech/Qt-4.8.0///bin/uic >> checking for rcc-qt4... no >> checking for rcc... /usr/local/Trolltech/Qt-4.8.0///bin/rcc >> checking whether NLS is requested... yes >> checking for msgfmt... /usr/bin/msgfmt >> checking for gmsgfmt... /usr/bin/msgfmt >> checking for xgettext... /usr/bin/xgettext >> checking for msgmerge... /usr/bin/msgmerge >> checking whether we are using the GNU C Library 2 or newer... yes >> checking for ranlib... ranlib >> checking for simple visibility declarations... yes >> checking for inline... inline >> checking for size_t... yes >> checking for stdint.h... yes >> checking for working alloca.h... yes >> checking for alloca... yes >> checking for stdlib.h... (cached) yes >> checking for unistd.h... (cached) yes >> checking for sys/param.h... yes >> checking for getpagesize... yes >> checking for working mmap... yes >> checking whether integer division by zero raises SIGFPE... yes >> checking for inttypes.h... yes >> checking for unsigned long long int... yes >> checking for inttypes.h... (cached) yes >> checking whether the inttypes.h PRIxNN macros are broken... no >> checking whether imported symbols can be declared weak... yes >> checking pthread.h usability... yes >> checking pthread.h presence... yes >> checking for pthread.h... yes >> checking for pthread_kill in -lpthread... yes >> checking for pthread_rwlock_t... yes >> checking for multithread API to use... posix >> checking argz.h usability... yes >> checking argz.h presence... yes >> checking for argz.h... yes >> checking for inttypes.h... (cached) yes >> checking limits.h usability... yes >> checking limits.h presence... yes >> checking for limits.h... yes >> checking for unistd.h... (cached) yes >> checking for sys/param.h... (cached) yes >> checking for getcwd... yes >> checking for getegid... yes >> checking for geteuid... yes >> checking for getgid... yes >> checking for getuid... yes >> checking for mempcpy... yes >> checking for munmap... yes >> checking for stpcpy... yes >> checking for strcasecmp... yes >> checking for strdup... yes >> checking for strtoul... yes >> checking for tsearch... yes >> checking for argz_count... yes >> checking for argz_stringify... yes >> checking for argz_next... yes >> checking for __fsetlocking... yes >> checking whether feof_unlocked is declared... yes >> checking whether fgets_unlocked is declared... no >> checking for iconv... (cached) yes >> checking for iconv declaration... (cached) install-shextern size_t iconv >> (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t >> *outbytesleft); >> checking for NL_LOCALE_NAME macro... yes >> checking for bison... bison >> checking version of bison... 2.3, ok >> checking for long long int... yes >> checking for long double... yes >> checking for wchar_t... yes >> checking for wint_t... yes >> checking for intmax_t... yes >> checking whether printf() supports POSIX/XSI format strings... yes >> checking whether we are using the GNU C Library 2.1 or newer... yes >> checking for stdint.h... (cached) yes >> checking for SIZE_MAX... yes >> checking for stdint.h... (cached) yes >> checking for CFPreferencesCopyAppValue... no >> checking for CFLocaleCopyCurrent... no >> checking for ptrdiff_t... yes >> checking stddef.h usability... yes >> checking stddef.h presence... yes >> checking for stddef.h... yes >> checking for stdlib.h... (cached) yes >> checking for string.h... (cached) yes >> checking for asprintf... yes >> checking for fwprintf... yes >> checking for putenv... yes >> checking for setenv... yes >> checking for setlocale... yes >> checking for snprintf... yes >> checking for wcslen... yes >> checking whether _snprintf is declared... no >> checking whether _snwprintf is declared... no >> checking whether getc_unlocked is declared... yes >> checking for nl_langinfo and CODESET... yes >> checking for LC_MESSAGES... yes >> checking for CFPreferencesCopyAppValue... (cached) no >> checking for CFLocaleCopyCurrent... (cached) no >> checking whether included gettext is requested... no >> checking for GNU gettext in libc... yes >> checking whether to use NLS... yes >> checking where the gettext function comes from... libc >> checking whether sys/types.h defines makedev... yes >> checking sys/time.h usability... yes >> checking sys/time.h presence... yes >> checking for sys/time.h... yes >> checking for sys/types.h... (cached) yes >> checking sys/select.h usability... yes >> checking sys/select.h presence... yes >> checking for sys/select.h... yes >> checking locale.h usability... yes >> checking locale.h presence... yes >> checking for locale.h... yes >> checking utime.h usability... yes >> checking utime.h presence... yes >> checking for utime.h... yes >> checking sys/utime.h usability... no >> checking sys/utime.h presence... no >> checking for sys/utime.h... no >> checking whether stat file-mode macros are broken... no >> checking whether time.h and sys/time.h may both be included... yes >> checking for mode_t... yes >> checking for off_t... yes >> checking for pid_t... yes >> checking return type of signal handlers... void >> checking for size_t... (cached) yes >> checking for uid_t in sys/types.h... yes >> checking whether PATH_MAX is defined by header limits.h... yes >> checking for chmod... yes >> checking for close... yes >> checking for _close... no >> checking for fork... yes >> checking for getpid... yes >> checking for _getpid... no >> checking for lstat... yes >> checking for mkfifo... yes >> checking for open... yes >> checking for _open... no >> checking for pclose... yes >> checking for _pclose... no >> checking for popen... yes >> checking for _popen... no >> checking for readlink... yes >> checking for strerror... yes >> checking for mkdir... yes >> checking for _mkdir... no >> checking whether mkdir takes one argument... no >> checking for sys/select.h... (cached) yes >> checking sys/socket.h usability... yes >> checking sys/socket.h presence... yes >> checking for sys/socket.h... yes >> checking types of arguments for select... int,fd_set *,struct timeval * >> checking aspell.h usability... no >> checking aspell.h presence... no >> checking for aspell.h... no >> checking for new_aspell_config in -laspell... no >> checking whether to use aspell... no >> checking for ENCHANT... yes >> checking whether to use enchant... yes >> checking hunspell/hunspell.hxx usability... no >> checking hunspell/hunspell.hxx presence... no >> checking for hunspell/hunspell.hxx... no >> checking whether to use hunspell... no >> checking for fcntl... yes >> checking for library containing gethostbyname... none required >> checking for library containing socket... none required >> configure: creating ./config.status >> config.status: creating Makefile >> config.status: creating lyx.1 >> config.status: creating boost/Makefile >> config.status: creating config/Makefile >> config.status: creating development/Makefile >> config.status: creating development/MacOSX/Makefile >> config.status: creating development/MacOSX/Info.plist >> config.status: creating development/MacOSX/lyxrc.dist >> config.status: creating development/MacOSX/spotlight/Makefile >> config.status: creating development/cygwin/Makefile >> config.status: creating development/cygwin/lyxrc.dist >> config.status: creating development/lyx.spec >> config.status: creating intl/Makefile >> config.status: creating lib/Makefile >> config.status: creating lib/doc/Makefile >> config.status: creating lib/lyx2lyx/lyx2lyx_version.py >> config.status: creating lib/lyx2lyx/Makefile >> config.status: creating m4/Makefile >> config.status: creating po/Makefile.in >> config.status: creating sourcedoc/Doxyfile >> config.status: creating sourcedoc/Makefile >> config.status: creating src/client/Makefile >> config.status: creating src/client/lyxclient.1 >> config.status: creating src/Makefile >> config.status: creating src/tex2lyx/Makefile >> config.status: creating src/tex2lyx/tex2lyx.1 >> config.status: creating src/support/Makefile >> config.status: creating src/frontends/Makefile >> config.status: creating src/frontends/qt4/Makefile >> config.status: creating config.h >> config.status: config.h is unchanged >> config.status: executing depfiles commands >> config.status: executing po-directories commands >> config.status: creating po/POTFILES >> config.status: creating po/Makefile >> >> Configuration >> Host type: x86_64-unknown-linux-gnu >> Special build flags: build=release use-enchant >> C Compiler: gcc >> C Compiler LyX flags: >> C Compiler flags: -O2 >> C++ Compiler: g++ (4.3.2) >> C++ Compiler LyX flags: >> C++ Compiler flags: -O2 >> Linker flags: >> Linker user flags: >> Qt 4 Frontend: >> Qt 4 version: 4.8.0 >> Packaging: posix >> LyX binary dir: /usr/local/bin >> LyX files dir: /usr/local/share/lyx >> >> Configuration of LyX was successful. >> Type 'make' to compile the program, >> and then 'make install' to install it. >> sajjad@sajjad:~/Downloads/LyX/lyx-2.0.0$ >> >> >> ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> I did make and make install and then i edited the ld.so.conf file and >> entered the following path : >> >> //////////////////////////////////////////////////////////////////////////////// >> /usr/local/share/lyx >> //////////////////////////////////////////////////////////////////////////////// >> >> >> What else did i miss in the process and i would really appreciate your >> suggestion to get it functional. >> >> >> >> Thanks >> Sajjad >> >> On Sat, Feb 25, 2012 at 1:24 PM, Stephan Witt <st.w...@gmx.net> wrote: >> Am 25.02.2012 um 05:57 schrieb Sajjad: >> >> > I compiled both qt and lyx from source. The installation instructions for >> > qt did not mention anything about this issue and it is working fine. >> > >> > Is there any way to send the parameter while configuring lyx so that the >> > compilation is done against the 32 -bit instead ? >> >> Why did you compile Qt form source? Didn't you have it already installed? >> I think it's better to use the system Qt and install the missing developer >> package if needed. >> You have to be sure to provide the correct version of Qt at runtime if you >> want to use your own package. >> To verify that you may use "ldd /path/to/lyx" to check what Qt-libraries are >> linked at run time. >> Perhaps you have to adjust your LD_LIBRARY_PATH variable accordingly. >> >> Stephan >> >> > >> > I am using the 64-bit ubuntu. >> > >> > >> > >> > On Fri, Feb 24, 2012 at 6:34 PM, Richard Heck <rgh...@comcast.net> wrote: >> > On 02/24/2012 09:51 AM, Sajjad wrote: >> > > hello forum, >> > > >> > > I just managed to compile LyX from source and it compiled fine. The qt >> > > path is mentioned while configuring and configuring. >> > > >> > > Now when i try to run "lyx" or "lyxclient" i get the following error: >> > > >> > > ///////////////////////////////////// >> > > sajjad@sajjad:~$ lyxclient: error while loading shared libraries: >> > > libQtGui.so.4: wrong ELF class: ELFCLASS32 >> > > //////////////////////////////////// >> > > >> > It looks like LyX has been compiled as a 64 bit app, but what's being >> > found are 32 bit libraries. I'm afraid I don't know why this would be. >> > But maybe that's a clue? >> > >> > Richard >> > >> > >> >> > >