when trying to load a bibtex file using a fresh checkout of the master branch, I get a window saying "No part available for the file ...", and the file is not loaded. Reproducible: Always
Have you followed the instruction on https://userbase.kde.org/KBibTeX/Development? You may need to set some environment variables unless you install KBibTeX in /usr (or where KF5 is installed in your case). Also, "kbuildsycoca5" needs to be run.
I made some tests myself and tried to remove some obstacles. Please locate file 'mimeapps.list' somewhere under ~/.local/share (or ~/.kde/share) and remove any lines that make a reference to KBibTeX (should be six lines in total). Fetch and merge the latest revision from the 'master' branch, compile and install. Does locating the KPart work now?
I removed the mimeapps.list file, but that did not help - I still get the message "No part available for file of mime type 'text/x-bibtex'." when trying to create a new bibtex file, and similar when trying to open an existing file. The commands I used for installation are cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=release make sudo make install kbuildsycoca5
> cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=release > make > sudo make install > kbuildsycoca5 Hm, can you please tell me where inside /usr the files kbibtexpart.desktop and kbibtexpart.so are located?
locate returns /usr/lib/kde4/kbibtexpart.so /usr/lib/x86_64-linux-gnu/plugins/kbibtexpart.so /usr/share/kde4/services/kbibtexpart.desktop /usr/share/kservices5/kbibtexpart.desktop
(In reply to Gandalf Lechner from comment #5) > locate returns > > /usr/lib/kde4/kbibtexpart.so > /usr/lib/x86_64-linux-gnu/plugins/kbibtexpart.so > > /usr/share/kde4/services/kbibtexpart.desktop > /usr/share/kservices5/kbibtexpart.desktop Can you please remove all files in /usr that relate to KBibTeX for KDE4? This includes /usr/lib/kde4/kbibtexpart.so and /usr/share/kde4/services/kbibtexpart.desktop but other files as well. If you have the build directory of KBibTeX for KDE 4 available, you can run "sudo make uninstall" there, which should do the trick. Next, the most recent commits of 'master' should print out additional debugging information in case the part is not found. Please fetch, compile and install this code, and then let KBibTeX run in a terminal. What information is printed right before you get the message box about the missing part? BTW, which Linux distribution are you using?
Ok, I now removed the kde4 version which I had installed with apt. At least the two kde4 files mentioned above are gone, I hope it is clean now. I am using kubuntu 15.10 beta2 (the problem discussed here was also present with 15.04). After a fresh checkout, compilation fails with ... 84%] Built target kbibtexgui [ 84%] Automatic moc for target kbibtex [ 84%] Built target kbibtex_automoc [ 84%] Determine Git revision -- Git revision is dad9f16 (master) [ 84%] Built target GITrevisionProgram [ 84%] Building CXX object src/program/CMakeFiles/kbibtex.dir/program.cpp.o /home/gandalf/down/git/kbibtex/src/program/program.cpp: In function ‘int main(int, char**)’: /home/gandalf/down/git/kbibtex/src/program/program.cpp:92:35: error: ‘qCInfo’ was not declared in this scope qCInfo(LOG_KBIBTEX_PROGRAM) << "Located KPart service:" << service->library() << "with description" << service->comment(); ^ src/program/CMakeFiles/kbibtex.dir/build.make:54: recipe for target 'src/program/CMakeFiles/kbibtex.dir/program.cpp.o' failed
Created attachment 94750 [details] Define qCInfo through a #define for Qt 5.4 or earlier
> /home/gandalf/down/git/kbibtex/src/program/program.cpp:92:35: error: > ‘qCInfo’ was not declared in this scope > qCInfo(LOG_KBIBTEX_PROGRAM) << "Located KPart service:" << > service->library() << "with description" << service->comment(); Most likely due to an Qt version before 5.5; only version 5.5 introduced qCInfo. Please test and confirm if the code compiles if you apply the patch in attachment 94750 [details].
the patch made it compile nicely again :-) now to the output in the terminal. after starting kbibtex: kbibtex.program: Starting KBibTeX version Git revision dad9f16 (master) QCommandLineParser: option not defined: "author" QCommandLineParser: option not defined: "license" kbibtex.data: Creating File instance 100000 kbibtex.program: No Okular part for PDF or PostScript document preview available. kbibtex.program: HTML KPart is available, using it instead of WebEngine or WebKit (neither available) for HTML/Web preview. kbibtex.program: Located KPart service: "kbibtexpart" with description "KParts-Komponente zum Betrachten und Editieren von Bibliographiedateien" KSambaShare: Could not find smb.conf! and after clicking on "open" for a bibtex file: No file found for ".xml" , even though the file appeared in a directory listing. Either it was just removed, or the directory doesn't have executable permission... ("/home/gandalf/.local/share/mime", "/usr/share/mime") kbibtex.program: Using service "BibTeX-Betrachter und -Editor" ( "KParts-Komponente zum Betrachten und Editieren von Bibliographiedateien" ) for mime type "text/x-bibtex" Error loading plugin "kbibtexpart" "Die dynamische Bibliothek konnte nicht gefunden werden." Plugin search paths are ("/usr/lib/x86_64-linux-gnu/qt5/plugins", "/usr/bin") The environment variable QT_PLUGIN_PATH might be not correctly set kbibtex.program: Could not instanciate read-write part for service "BibTeX-Betrachter und -Editor" ( "Die dynamische Bibliothek konnte nicht gefunden werden." ) Error loading plugin "kbibtexpart" "Die dynamische Bibliothek konnte nicht gefunden werden." Plugin search paths are ("/usr/lib/x86_64-linux-gnu/qt5/plugins", "/usr/bin") The environment variable QT_PLUGIN_PATH might be not correctly set kbibtex.program: Could not instanciate part for service "BibTeX-Betrachter und -Editor" (mimeType= "text/x-bibtex" , error msg= "Die dynamische Bibliothek konnte nicht gefunden werden." )
(In reply to Gandalf Lechner from comment #10) > the patch made it compile nicely again :-) Ok, I added it to Git master as of revision 417e748a464d20. > The environment variable QT_PLUGIN_PATH might be not correctly set I was able to reproduce your problem and could solve it by setting the environment variable QT_PLUGIN_PATH include the path of where kbibtexpart.so is install to (in my case "/tmp/usr/lib64/plugins/"). AFAIK you can include multiple paths in this variable, separated by single ':'.
yeeha, it works again! Many thanks.
I am also getting this error ("No part available for file of mime type 'text/x-bibtex'.") even though QT_PLUGINS_PATH is set to the directory that contains my kbibtexpart.so. I run Arch Linux and use the Git master branch.
Created attachment 107972 [details] Printing env variables including QT_PLUGIN_PATH tb: please apply and test this patch. I think you can modify the PKGBUILD to apply the patch for you when building a package for KBibTeX. Then, launch KBibTeX in a terminal and post a copy of the output you get from start until you get the "No part available" error message.
Created attachment 107973 [details] Printing env variables including QT_PLUGIN_PATH (2) Fixing copy&paste error from previous patch
(In reply to Thomas Fischer from comment #15) > Created attachment 107973 [details] > Printing env variables including QT_PLUGIN_PATH (2) > > Fixing copy&paste error from previous patch One of the recent changes to the code must have fixed this. It works now. Lovely, thanks!
Git commit 3b47c81b26d4cdbb074ecdd0065c817d7900bad9 by Thomas Fischer. Committed on 07/10/2017 at 20:44. Pushed by thomasfischer into branch 'master'. Printing environment variables if service instanciation fails In order to trace problems with service/part instanciation, various relevant environment variables are printed when instanciation fails. M +11 -1 src/program/openfileinfo.cpp https://commits.kde.org/kbibtex/3b47c81b26d4cdbb074ecdd0065c817d7900bad9