check the newley sumitted ebuild i think it should read S=${WORKDIR}/qt-x11-free-${PV} instead of S=${WORKDIR}/${PV}
Even making that change, it looks like that ebuild tried to write somthing to the *current* directory that i ran emerge from, rather than the appropriate /var/tmp/portage... (heres where it died on me. i had run emerge from ~root): g++ -c -pipe -fno-exceptions -fPIC -Wall -W -O2 -D_REENTRANT -DDESIGNER -DQT_INTERNAL_XML -DQT_INTERNAL_WORKSPACE -DQT_INTERNAL_ICONVIEW -DQT_INTERNAL_TABLE -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -I/tmp/portage/portage/qt-3.2.1/work/qt-x11-free-3.2.1/mkspecs/linux-g++ -I. -I/usr/include/freetype2 -I../shared -I../uilib -I../../../include -I/usr/X11R6/include -I.moc/release-shared-mt/ -o ./tableeditorimpl.o tableeditorimpl.cpp /tmp/portage/portage/qt-3.2.1/work/qt-x11-free-3.2.1/bin/uic -L /tmp/portage/portage/qt-3.2.1/work/qt-x11-free-3.2.1/plugins listboxeditor.ui -i listboxeditor.h -o listboxeditor.cpp QSettings: error creating /root/.qt /tmp/portage/portage/qt-3.2.1/work/qt-x11-free-3.2.1/bin/uic: relocation error: /tmp/portage/portage/qt-3.2.1/work/qt-x11-free-3.2.1/bin/uic: undefined symbol: _ZNK7QString3argExii make[3]: *** [listboxeditor.cpp] Error 127 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/tmp/portage/portage/qt-3.2.1/work/qt-x11-free-3.2.1/tools/designer/designer' make[2]: *** [sub-designer] Error 2 make[2]: Leaving directory `/tmp/portage/portage/qt-3.2.1/work/qt-x11-free-3.2.1/tools/designer' make[1]: *** [sub-designer] Error 2 make[1]: Leaving directory `/tmp/portage/portage/qt-3.2.1/work/qt-x11-free-3.2.1/tools' make: *** [sub-tools] Error 2 !!! ERROR: x11-libs/qt-3.2.1 failed. !!! Function src_compile, Line 106, Exitcode 2 !!! (no error message) Gentoo root # the line mentioning QSettings: error creating /root/.qt has me concerned.
I just got this: tlaloc root # emerge -u world Calculating world dependencies ...done! >>> emerge (1 of 1) x11-libs/qt-3.2.1 to / >>> md5 src_uri ;-) qt-x11-free-3.2.1.tar.bz2 >>> Unpacking source... >>> Unpacking qt-x11-free-3.2.1.tar.bz2 to /var/tmp/portage/qt-3.2.1/work /usr/sbin/ebuild.sh: line 39: cd: /var/tmp/portage/qt-3.2.1/work/3.2.1: No such file or directory cp: cannot stat `configure': No such file or directory sed: can't read configure.orig: No such file or directory /usr/sbin/ebuild.sh: line 44: cd: mkspecs/linux-g++: No such file or directory * Using environment definition of $CXX cp: cannot stat `qmake.conf': No such file or directory sed: can't read qmake.conf.orig: No such file or directory * Using environment definition of $CC >>> Source unpacked. /usr/sbin/ebuild.sh: line 100: ./configure: No such file or directory !!! ERROR: x11-libs/qt-3.2.1 failed. !!! Function src_compile, Line 103, Exitcode 127 !!! (no error message)
Wow, I didn't think anyone would be all over this so fast. The problem (S=) has been fixed.
*** Bug 27476 has been marked as a duplicate of this bug. ***
yeah i get the same error... as Scott after changing the S= line /tmp/portage/portage/qt-3.2.1/work/qt-x11-free-3.2.1/bin/uic: relocation error: /tmp/portage/portage/qt-3.2.1/work/qt-x11-free-3.2.1/bin/uic: undefined symbol: _ZNK7QString3argExii
Try adding the line: export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}" in src_compile() { } right before the line: emake sub-tools sub-src....
adding that still gives the same error... this is where i added it export QTDIR=${S} export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}" emake src-qmake src-moc sub-src sub-tools || die thats the only referance i saw to sub-tools and sub-src
To make it really work, don't forget to alter the names of the links and library in src_install() to show the new version 3.2.1, not 3.2.0
I guess we'll have to dive into this farther. I figured uic was just dynamically linking to the old Qt version, but it may be picking it up through some cache file. As a workaround in the meantime, if you just move the old qt directory out of the way it should work: mv /usr/qt/3 /usr/qt/3_original emerge qt-3.2.1
In /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/config.tests/x11/xcursor.test, I had to replace all "head -1" with "head -n 1", to make the Xcursor detection work...
I'm trying to get qt-3.2.1 to compile without doing the "mv /usr/qt/3" hack. I've found the following which suggests that it's not due to using the wrong libqt-mt.so. Well, at least not always... make[3]: Entering directory `/var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/tools/designer/designer' /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/bin/uic -L /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/plugins listboxeditor.ui -o listboxeditor.h /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/bin/uic -L /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/plugins editfunctions.ui -o editfunctions.h /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/bin/uic -L /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/plugins newform.ui -o newform.h /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/bin/uic -L /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/plugins listvieweditor.ui -o listvieweditor.h <snip of more successful uic's> /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/bin/uic -L /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/plugins dbconnectioneditor.ui -o dbconnectioneditor.h /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/bin/uic -L /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/plugins tableeditor.ui -o tableeditor.h g++ -c -pipe -I/usr/include/postgresql/server -fno-exceptions -fPIC -Wall -W -O2 -D_REENTRANT -DDESIGNER -DQT_INTERNAL_XML -DQT_INTERNAL_WORKSPACE -DQT_INTERNAL_ICONVIEW -DQT_INTERNAL_TABLE -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -I/var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/mkspecs/linux-g++ -I. -I/usr/include/freetype2 -I../shared -I../uilib -I../../../include -I/usr/X11R6/include -I.moc/release-shared-mt/ -o ./command.o command.cpp g++ -c -pipe -I/usr/include/postgresql/server -fno-exceptions -fPIC -Wall -W -O2 -D_REENTRANT -DDESIGNER -DQT_INTERNAL_XML -DQT_INTERNAL_WORKSPACE -DQT_INTERNAL_ICONVIEW -DQT_INTERNAL_TABLE -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -I/var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/mkspecs/linux-g++ -I. -I/usr/include/freetype2 -I../shared -I../uilib -I../../../include -I/usr/X11R6/include -I.moc/release-shared-mt/ -o ./formwindow.o formwindow.cpp <snip of more successful compiles> g++ -c -pipe -I/usr/include/postgresql/server -fno-exceptions -fPIC -Wall -W -O2 -D_REENTRANT -DDESIGNER -DQT_INTERNAL_XML -DQT_INTERNAL_WORKSPACE -DQT_INTERNAL_ICONVIEW -DQT_INTERNAL_TABLE -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -I/var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/mkspecs/linux-g++ -I. -I/usr/include/freetype2 -I../shared -I../uilib -I../../../include -I/usr/X11R6/include -I.moc/release-shared-mt/ -o ./tableeditorimpl.o tableeditorimpl.cpp /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/bin/uic -L /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/plugins listboxeditor.ui -i listboxeditor.h -o listboxeditor.cpp /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/bin/uic: relocation error: /var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/bin/uic: undefined symbol: _ZNK7QString3argExii make[3]: *** [listboxeditor.cpp] Error 127 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/var/tmp/portage/qt-3.2.1/work/qt-x11-free-3.2.1/tools/designer/designer' It all happened in the same directory, so one would assume that no make vars, etc would have changed. Have to look into that further, though... BTW, why is this bug still RESOLVED FIXED?
I think it is due to having the old Qt floating around; the uic is picking it up instead of the 3.2.1 that you are currently building. As an experiment, try adding this line in src_compile() right after export SYSCONF= line export LD_LIBRARY_PATH=${WORKDIR}/lib:${LD_LIBRARY_PATH} I bet that will fix the problem.
Yeah, I tried that - actually I added it just before ./configure. I've found that I've been able to get it to work by either putting ${WORKDIR}/lib at the top of ld.so.conf (expanded of course) or by removing /usr/qt/3/lib from ld.so.conf and putting it into LD_LIBRARY_PATH which the ebuild then prepends with {WORKDIR}/lib. It would seem that ld-2.3.2.so is looking at ld.so.cache before LD_LIBRARY_PATH but, after checking out the source code, that possibility is very slim. Here is an excerpt: /* Map in the shared object file NAME. */ struct link_map * internal_function _dl_map_object (struct link_map *loader, const char *name, int preloaded, int type, int trace_mode, int mode) { <snip> /* Look for this name among those already loaded. */ for (l = GL(dl_loaded); l; l = l->l_next) { /* If the requested name matches the soname of a loaded object, use that object. Elide this check for names that have not yet been opened. */ if (__builtin_expect (l->l_faked, 0) != 0) continue; if (!_dl_name_match_p (name, l)) { const char *soname; if (__builtin_expect (l->l_soname_added, 1) || l->l_info[DT_SONAME] == NULL) continue; soname = ((const char *) D_PTR (l, l_info[DT_STRTAB]) + l->l_info[DT_SONAME]->d_un.d_val); if (strcmp (name, soname) != 0) continue; /* We have a match on a new name -- cache it. */ add_name_to_object (l, soname); l->l_soname_added = 1; } /* We have a match. */ return l; } /* Display information if we are debugging. */ <snip> if (strchr (name, '/') == NULL) { /* Search for NAME in several places. */ <snip> /* When the object has the RUNPATH information we don't use any RPATHs. */ if (loader == NULL || loader->l_info[DT_RUNPATH] == NULL) { /* First try the DT_RPATH of the dependent object that caused NAME to be loaded. Then that object's dependent, and on up. */ for (l = loader; fd == -1 && l; l = l->l_loader) { if (l->l_rpath_dirs.dirs == NULL) { if (l->l_info[DT_RPATH] == NULL) { /* There is no path. */ l->l_rpath_dirs.dirs = (void *) -1; continue; } else { /* Make sure the cache information is available. */ size_t ptrval = (D_PTR (l, l_info[DT_STRTAB]) + l->l_info[DT_RPATH]->d_un.d_val); decompose_rpath (&l->l_rpath_dirs, (const char *) ptrval, l, "RPATH"); } } if (l->l_rpath_dirs.dirs != (void *) -1) fd = open_path (name, namelen, preloaded, &l->l_rpath_dirs, &realname, &fb); } /* If dynamically linked, try the DT_RPATH of the executable itself. */ l = GL(dl_loaded); if (fd == -1 && l && l->l_type != lt_loaded && l != loader && l->l_rpath_dirs.dirs != (void *) -1) fd = open_path (name, namelen, preloaded, &l->l_rpath_dirs, &realname, &fb); } /* Try the LD_LIBRARY_PATH environment variable. */ if (fd == -1 && env_path_list.dirs != (void *) -1) fd = open_path (name, namelen, preloaded, &env_path_list, &realname, &fb); /* Look at the RUNPATH information for this binary. */ <snip> /* Check the list of libraries in the file /etc/ld.so.cache, for compatibility with Linux's ldconfig program. */ <snip> /* Finally, try the default path. */ <snip> } else { /* The path may contain dynamic string tokens. */ <snip> } <snip> return _dl_map_object_from_fd (name, fd, &fb, realname, loader, type, mode); } INTDEF (_dl_map_object) I didn't snip the code for the two searches prior to that of checking LD_LIBRARY_PATH. I believe it's one of these two that is causing the problem - more than likely it is matching against the already loaded libqt-mt. Will reboot without X and try it that way and post back results.
Didn't work... not sure how to proceed... I don't fully understand what it the DT_RPATH is but ldd uic always shows that /usr/qt/3/lib/libqt-mt.so would be used to fill the libqt-mt dependency. Hmmm... I think this ones going in my too-hard basket.
I think this all now *should* now work in the 3.2.1 ebuild.