Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Sep 2013 10:21:54 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        gecko@freebsd.org
Subject:   www/firefox broken if DEBUG is enabled
Message-ID:  <201309061021.54959.jhb@freebsd.org>

next in thread | raw e-mail | index | archive | help
Compile error is:

/usr/ports/www/firefox/work/mozilla-release/netwerk/wifi/nsWifiScannerFreeBSD.cpp:127:13: error: 
      invalid operands to binary expression ('const char *' and 'const char *')
            << "SSID: " << ssid << ", "
            ^  ~~~~~~~~
../../../netwerk/wifi/nsWifiMonitor.h:27:61: note: expanded from macro 'LOG'    
#define LOG(args)     PR_LOG(gWifiMonitorLog, PR_LOG_DEBUG, args)
                                                            ^
/usr/local/include/nspr/prlog.h:178:19: note: expanded from macro 'PR_LOG'      
      PR_LogPrint _args;         \
                  ^
1 error generated.                                                              

If you look at the the prlog.h header, you can see that PR_LOG() expects to
get printf-style args, but the code in nsWifiScannerFreeBSD.cpp is trying to
use C++ iostreams:

+      // log the data
+      LOG(( "FreeBSD access point: "
+            << "SSID: " << ssid << ", "
+            << "MAC: " << isr->isr_bssid << ", "
+            << "Strength: " << isr->isr_rssi ", "
+            << "Channel: " << isr->isr_freq << "MHz" ));

(This code is in files/patch-bug893397 in the port.)

I think the fix is to just change this to use printf style, but I punted and
built firefox without debugging for now.  This should likely be fixed upstream
as well (if not already).

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309061021.54959.jhb>