jim45002 / torrc_util

Qt GUI for some torrc options
GNU General Public License v3.0
1 stars 2 forks source link

How to compile? cannot find -lmap_widget_factory #1

Open probonopd opened 5 years ago

probonopd commented 5 years ago

How to compile? Getting

[ 92%] Linking CXX executable torrc_utility
/usr/bin/ld: cannot find -lmap_widget_factory
collect2: error: ld returned 1 exit status
make[2]: *** [torrc_utility] Error 1
make[1]: *** [CMakeFiles/torrc_utility.dir/all] Error 2
make: *** [all] Error 2
The command "make -j$(nproc)" exited with 2.

This is my Travis CI build script: https://github.com/probonopd/torrc_util/blob/patch-1/.travis.yml

This is the full build log: https://api.travis-ci.com/v3/job/199496654/log.txt

jim45002 commented 5 years ago

Sorry it took me this long to respond. This is really my first time using GitHub, didn't see your issue.

That library is under the lib directory. It depends on the marble-widget dev library and Qt5. I downloaded the library from GitHub, built it and installed it using Qt-5.9. I think it's best to build marble-widget yourself. You can build it in QtCreator or using cmake at the command-line. Let me know how it works out.

After you build map_widget_factory do a make install and sudo ldconfig. If you still get errors about the library let me know. I'll eventually close the issue if you don't get back to me.

probonopd commented 5 years ago

This is my latest build log: https://api.travis-ci.com/v3/job/201270984/log.txt

Despite building Marble manually, it does not find the library.

This is my latest Travis CI build script: https://github.com/probonopd/torrc_util/blob/076206fcffecefedf716d242abffab2b2e5a4199/.travis.yml

jim45002 commented 5 years ago

Hi,

Where is map_widget_factory on your system? Where did it install? Also when you reply add the output of the ldd command for map_widget_factory. Do ldd 'path-to-lib' at the command line.

probonopd commented 5 years ago

The only mention of map_widget_factory in the build log is where it fails to find it, so I have no clue whether or where it is on my system.

It depends on the marble-widget dev library and Qt5. I downloaded the library from GitHub, built it and installed it using Qt-5.9.

Can you confirm that this should do the trick?

git clone https://github.com/KDE/marble
cd marble
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
make -j$(nproc)
sudo make install
sudo ldconfig
cd ..

Where is map_widget_factory in the system when you do this?

jim45002 commented 5 years ago

You still need to build the map_widget_factory library and install it. The compile and install of Marble won't install map_widget_factory.

probonopd commented 5 years ago

You still need to build the map_widget_factory library and install it.

How?

jim45002 commented 5 years ago

I thought you already read to the readme for torrc_util. See the readme at https://github.com/jim45002/torrc_util for build instructions.

probonopd commented 5 years ago

Ah thanks, must have overlooked this part. Testing now!

probonopd commented 5 years ago

OK, now it's being built but it seems like make install is broken?

[100%] Built target torrc_utility
The command "make -j$(nproc)" exited with 0.
0.01s$ make DESTDIR=appdir -j$(nproc) install ; find appdir/
make: *** No rule to make target `install'.  Stop.
find: `appdir/': No such file or directory
jim45002 commented 5 years ago

Don't believe I added install to the cmake configuration. The executable should be in the build directory.

probonopd commented 5 years ago

Could you please add make install so that we get

/usr/bin/torrc_util
/usr/share/applications/torrc_util.desktop
/usr/share/icons/hicolor/scalable/applications/torrc_util.svg

as most GUI applications on Linux do, in order to show up properly in the menus? Thank you.