LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Gnuradio and log4cpp (https://www.linuxquestions.org/questions/slackware-14/gnuradio-and-log4cpp-4175659129/)

pchristy 08-14-2019 07:03 AM

Gnuradio and log4cpp
 
I'm trying to build gnuradio-3.8 on current. One of the dependencies is log4cpp. I've built and installed log4cpp-1.1.3, but gnuradio still complains it can't find it.

Googling for this throws up a lot of people with the same problem, but no apparent solutions! I know there's a few people on here using gnuradio, so how have you got around this? Or didn't you have the problem?

TIA,

--
Pete

Labinnah 08-14-2019 07:48 AM

Fast check, without building. Cmake form gnuradio 3.8 finds log4cpp 1.0 from SBo and also 1.1.3 from modified SBo on my "almost current".

Check "/CMakeFiles/CMakeError.log" for errors on your system.


Edit: Tested on second "little older almost current" and also gunradio cmake finds log4cpp.

pchristy 08-14-2019 08:55 AM

2 Attachment(s)
Thanks for the quick reply! My system is 64 bit -current (up to date). I'm running cmake without any options at the moment, just to check what is required. The only slackbuild I've been able to find is well out of date, so I will probably need to write my own at some point. But first, I have to get it to compile!

Running cmake goes fine until:
Code:

-- Configuring volk support...
--  Enabling volk support.
--  Override with -DENABLE_VOLK=ON/OFF
--  Override with -DENABLE_INTERNAL_VOLK=ON/OFF
-- Looked for LOG4CPP libraries named log4cpp.
CMake Error at cmake/Modules/FindLOG4CPP.cmake:46 (message):
  Could NOT find LOG4CPP library
Call Stack (most recent call first):
  CMakeLists.txt:452 (find_package)


-- Configuring incomplete, errors occurred!

I'm attaching both the CMakeError.log and CMakeOutput.log files (changed .log to .txt to enable upload), but I can't find any reference to log4cpp in there! The liblog4cpp files are located in /usr/lib64 and are present and correct - as far as I can tell! (No errors on compiling them, anyway!)

I've tried both log4cpp-1.0 and 1.1.3.

As I say, it seems to be a not uncommon problem, but I haven't seen a solution anywhere.

Thanks for your help!

--
Pete

Labinnah 08-14-2019 09:22 AM

As everything works at my computers, I have only one idea. Try add in "/cmake/Modules/FindLOG4CPP.cmake" /usr/lib64 path
Code:

set(LOG4CPP_NAMES log4cpp)                                                                                                                                                     
find_library(LOG4CPP_LIBRARY                                                                                                                                                   
  NAMES ${LOG4CPP_NAMES}                                                                                                                                                       
  PATHS /usr/lib /usr/lib64 /usr/local/lib /opt/local/lib                                                                                                                                 
)

And run cmake again, best on fresh build directory.


BTW. On my system compilation fails due to boost problem.

pchristy 08-14-2019 09:47 AM

I think I might have cracked it! I rebooted the machine, cleared the cache (ccache -C) and suddenly its found log4cpp! I did do a ldconfig and updatedb after installing log4cpp, but whether it was rebooting or clearing the cache, I don't know.

I did run in to the cache problem building Kodi, when the build kept failing until I cleared it!

Regarding boost, have you tried Eric's (AlienBob) boost-compat libraries? http://slackware.uk/people/alien/sla.../boost-compat/

I still have a few other dependencies missing in order to build things like the companion, but I know what those are!

Onwards and upwards! :)

Thanks again for your help! I may be back again, but I think I have a handle on it now!

--
Pete

Labinnah 08-14-2019 10:01 AM

Quote:

Originally Posted by pchristy (Post 6025059)
Regarding boost, have you tried Eric's (AlienBob) boost-compat libraries? http://slackware.uk/people/alien/sla.../boost-compat/

I have it.

Gnuradio 3.7.13.2 work for me good enough, and I have no need to compile new version now. I wrote about boost only for your information.

pchristy 08-14-2019 10:03 AM

OK, I'll let you know how I get on! Just sorting out the remaining dependencies....

--
Pete

pchristy 08-15-2019 03:08 AM

Gnuradio-3.8 compiled without problems, once I'd got the dependencies sorted out. But I'm having an issue with gqrx - or rather, its dependencies, gr-osmosdr and gr-iqbal, neither of which seem to like boost-1.70.

Work continues...

--
Pete

pchristy 08-15-2019 06:04 AM

Although gnuradio-3.8 compiled fine, I'm having major problems with gqrx - or rather its dependencies. Both gr-iqbal and gr-osmosdr complained about boost-1.70.

I got round this by adding:
Code:

-DBoost_NO_BOOST_CMAKE=ON
though strangely, it now seems to recognise and accept boost-1.70. I expected it to ignore boost!

I had to fiddle around a bit with the -DCMAKE_PREFIX_PATH, as gnuradio-3.8 installs some of the config files in different directories than were being searched.

But then I hit a brick wall! Neither gr-osmosdr nor gr-iqbal recognise the gnuradio runtime! They haven't been updated in years (!), and rely on gnuradio-3.7.x

OK, so go back to gnuradio-3.7.13.2. This refuses to recognise the wxGTK3 install. It wants 2.7! (gnuradio-2.8 was quite happy with wxGTK3).

So, lets try to get the qt interface to build instead. This involves installing qwt. So, compile and install qwt-6.1.4. Still doesn't recognise it! I can only assume that gnuradio-3.7 is so old that it will only work with the obsolete qwt5.

At this point I'm losing the will to live!

--
Pete

Panagiotis Nik 08-15-2019 01:59 PM

Quote:

Originally Posted by pchristy (Post 6025308)
Although gnuradio-3.8 compiled fine, I'm having major problems with gqrx - or rather its dependencies. Both gr-iqbal and gr-osmosdr complained about boost-1.70.

Unfortunately 14.2 is too old to support gnuradio 3.8 and current is too new for the dependencies of gqrx...
This is the reason that I didn't submit an update for so long in SBo...

Last update for gr-iqbal was 5 years ago and its API is still on gnuradio 3.7 and the boost requirement stops to 1.69
I will try to fork and update gr-iqbal to be compatible with gnuradio 3.8
gqrx is still in 2.11.5 although there's some small changes in current maybe I need to reconsider for some of the required dependencies in order to successfully build in current...

pchristy 08-15-2019 02:05 PM

Thanks for that information! One of the perils of life on the bleeding edge, I guess!

gr-osmosdr doesn't seem to have been upgraded in ages either. Setting the boost requirement as I outlined above does get it to compile - seemingly with boost - but then I ran into the other issues!

In the meantime, I'm having a look at CubicSDR, which seems to do everything I need, with far fewer dependencies (I hope!).

Cheers,

--
Pete

Panagiotis Nik 08-15-2019 02:26 PM

Quote:

Originally Posted by pchristy (Post 6025452)
gr-osmosdr doesn't seem to have been upgraded in ages either. Setting the boost requirement as I outlined above does get it to compile - seemingly with boost - but then I ran into the other issues!

I will take a look in the entire chain for gqrx since I would like to have gqrx and gnuradio ready when a new Slackware release comes out...

Quote:

Originally Posted by pchristy (Post 6025452)
In the meantime, I'm having a look at CubicSDR, which seems to do everything I need, with far fewer dependencies (I hope!).

If you don't mind what hardware are you trying to use?

pchristy 08-15-2019 02:53 PM

Not at all! Its the new Nooelec R820T2. I'm not a Ham radio person, but I do design and build my own radio control equipment, so any form of spectrum analyzer is very useful! ;-)

--
Pete

Labinnah 08-15-2019 03:46 PM

Quote:

Originally Posted by pchristy (Post 6025468)
Its the new Nooelec R820T2.

Heh, I have almost same hardware (also RTL2832U+R820T2). I buy it for car remote control testing/altering. Now it mostly work as flightradar feed station.

MountainLogic 12-03-2019 01:48 PM

Quote:

Originally Posted by Labinnah (Post 6025051)
As everything works at my computers, I have only one idea. Try add in "/cmake/Modules/FindLOG4CPP.cmake" /usr/lib64 path
Code:

set(LOG4CPP_NAMES log4cpp)                                                                                                                                                     
find_library(LOG4CPP_LIBRARY                                                                                                                                                   
  NAMES ${LOG4CPP_NAMES}                                                                                                                                                       
  PATHS /usr/lib /usr/lib64 /usr/local/lib /opt/local/lib                                                                                                                                 
)

And run cmake again, best on fresh build directory.


BTW. On my system compilation fails due to boost problem.

I'm seeing the same log4cpp as others. After building log4cpp, in my Cmake-3.10 Modules directory I do not have a FindLOG4CPP.cmake file. Not sure how to auto-generate it.

Found out be SOLUTION: just comment out line 449 and donít bother looking for log4cpp. Seems to cmake and make/compile just fine. What could possibly go wrong😉


All times are GMT -5. The time now is 04:35 PM.