[Qt-embedded-interest] Error 301 (QNetworkReply::ProtocolUnknownError) for requests running under embedded Linux

Daniel Bowen qtmailinglist1 at bowensite.com
Tue Jun 16 10:08:49 CEST 2009


OK, I have it working now!  It was how I was building Qt for Embedded Linux
for the arm_v5t_le.  I was excluding a little too much it seems.

 

I have a fairly aggressive ./configure going on for the Linux-arm_v5t_le
environment to reduce the size (as well as editing common/g++.conf to use
-Os).  I'm not sure of the exact combination, but there were a few
"-no-feature-X" guys I had, that when I removed made it work.  For the
-no-feature things, I'd made a shell script to parse the qfeatures.txt file
to give me a complete list I could feed to ./configure.  I went through each
one, and took out the -no-feature based on a rough idea of what it might
effect.  But, it looks like I needed to leave out a couple more (so that the
feature was left in).

 

Here's the ones I had but took out to make t work:

 

                -no-feature-TEXTSTREAM

                -no-feature-TEXTCODEC

-no-feature-CODECS 

                -no-feature-IMAGEFORMATPLUGIN

                -no-feature-PROPERTIES

 

Not sure which one(s) was the magic one, but it was one or more of those.

 

And for the record, here's my new (for the moment at least) ./configure
(gives me a 2.0 MB libQtCore.so.4.5.1, 858 KB libQtNetwork.so.4.5.1, 209 KB
libQtXml.so.4.5.1) :

 

./configure -debug-and-release -opensource -prefix
$PWD/install/Linux-arm_v5t_le -prefix-install -shared -no-fast -largefile
-no-qt3support -no-svg -no-webkit -no-exceptions -I
$MONTAVISTA_DEVKIT/arm/v5t_le/target/usr/include -L
$MONTAVISTA_DEVKIT/arm/v5t_le/target/usr/lib -system-zlib -system-libtiff
-system-libpng -system-libjpeg -openssl-linked -xplatform
qws/linux-arm_v5t_le-g++ -embedded arm -little-endian -no-opengl -no-dbus
-no-cups -no-iconv -no-pch -confirm-license -verbose -nomake tools -nomake
docs -no-feature-TEXTHTMLPARSER -no-feature-TEXTODFWRITER
-no-feature-CSSPARSER -no-feature-CONCURRENT -no-feature-DRAGANDDROP
-no-feature-SESSIONMANAGER -no-feature-SHORTCUT -no-feature-ACTION
-no-feature-CURSOR -no-feature-CLIPBOARD -no-feature-WHEELEVENT
-no-feature-TABLETEVENT -no-feature-SOUND -no-feature-EFFECTS
-no-feature-SETTINGS -no-feature-FILESYSTEMMODEL
-no-feature-FILESYSTEMWATCHER -no-feature-TREEWIDGET -no-feature-LISTWIDGET
-no-feature-TABLEWIDGET -no-feature-DATETIMEEDIT -no-feature-STACKEDWIDGET
-no-feature-TEXTBROWSER -no-feature-SPLASHSCREEN -no-feature-SPLITTER
-no-feature-LCDNUMBER -no-feature-MENU -no-feature-LINEEDIT
-no-feature-SPINBOX -no-feature-TABBAR -no-feature-TABWIDGET
-no-feature-COMBOBOX -no-feature-FONTCOMBOBOX -no-feature-TOOLBUTTON
-no-feature-TOOLBAR -no-feature-TOOLBOX -no-feature-GROUPBOX
-no-feature-BUTTONGROUP -no-feature-MAINWINDOW -no-feature-DOCKWIDGET
-no-feature-WORKSPACE -no-feature-MDIAREA -no-feature-RESIZEHANDLER
-no-feature-STATUSBAR -no-feature-MENUBAR -no-feature-CONTEXTMENU
-no-feature-PROGRESSBAR -no-feature-SLIDER -no-feature-SCROLLBAR
-no-feature-DIAL -no-feature-SCROLLAREA -no-feature-GRAPHICSVIEW
-no-feature-SPINWIDGET -no-feature-TEXTEDIT -no-feature-SYNTAXHIGHLIGHTER
-no-feature-RUBBERBAND -no-feature-TOOLTIP -no-feature-STATUSTIP
-no-feature-SIGNALMAPPER -no-feature-WHATSTHIS -no-feature-VALIDATOR
-no-feature-SIZEGRIP -no-feature-CALENDARWIDGET
-no-feature-PRINTPREVIEWWIDGET -no-feature-MESSAGEBOX
-no-feature-COLORDIALOG -no-feature-FILEDIALOG -no-feature-FONTDIALOG
-no-feature-PRINTDIALOG -no-feature-PRINTPREVIEWDIALOG
-no-feature-PROGRESSDIALOG -no-feature-INPUTDIALOG -no-feature-TABDIALOG
-no-feature-ERRORMESSAGE -no-feature-WIZARD -no-feature-ITEMVIEWS
-no-feature-DIRMODEL -no-feature-STANDARDITEMMODEL -no-feature-PROXYMODEL
-no-feature-SORTFILTERPROXYMODEL -no-feature-STRINGLISTMODEL
-no-feature-LISTVIEW -no-feature-TABLEVIEW -no-feature-TREEVIEW
-no-feature-DATAWIDGETMAPPER -no-feature-COLUMNVIEW
-no-feature-STYLE_WINDOWS -no-feature-STYLE_MOTIF -no-feature-STYLE_CDE
-no-feature-STYLE_PLASTIQUE -no-feature-STYLE_WINDOWSXP
-no-feature-STYLE_WINDOWSVISTA -no-feature-STYLE_CLEANLOOKS
-no-feature-STYLE_WINDOWSCE -no-feature-STYLE_WINDOWSMOBILE
-no-feature-STYLE_STYLESHEET -no-feature-ICON -no-feature-MOVIE
-no-feature-IMAGEFORMAT_PPM -no-feature-IMAGEFORMAT_XBM
-no-feature-IMAGEFORMAT_XPM -no-feature-DIRECTPAINTER -no-feature-PICTURE
-no-feature-COLORNAMES -no-feature-PRINTER -no-feature-CUPS
-no-feature-PAINTONSCREEN -no-feature-PAINT_DEBUG
-no-feature-RASTERCALLBACKS -no-feature-FREETYPE -no-feature-QWS_QPF
-no-feature-QWS_QPF2 -no-feature-TEXTCODECPLUGIN -no-feature-BIG_CODECS
-no-feature-QWS_INPUTMETHODS -no-feature-COMPLETER
-no-feature-DESKTOPSERVICES -no-feature-SYSTEMTRAYICON
-no-feature-UNDOCOMMAND -no-feature-UNDOSTACK -no-feature-UNDOGROUP
-no-feature-UNDOVIEW -no-feature-SCRIPT -no-feature-ACCESSIBILITY
-no-feature-SVG -no-feature-GRAPHICSSVGITEM -no-feature-SVGGENERATOR
-no-feature-SVGRENDERER -no-feature-SVGWIDGET -no-feature-QWS_SOUNDSERVER
-no-feature-QWS_MULTIPROCESS -no-feature-QWS_KEYBOARD -no-feature-QWS_CURSOR
-no-feature-QWS_ALPHA_CURSOR -no-feature-QWS_MANAGER
-no-feature-QWS_DECORATION_DEFAULT -no-feature-QWS_DECORATION_WINDOWS
-no-feature-QWS_DECORATION_STYLED -no-feature-QWS_MOUSE
-no-feature-QWS_MOUSE_AUTO -no-feature-QWS_MOUSE_MANUAL
-no-feature-QWS_PROPERTIES -no-feature-SXE -no-feature-QWSEMBEDWIDGET
-no-feature-QWS_PROXYSCREEN -no-feature-QWS_DYNAMICSCREENTRANSFORMATION
-no-feature-WIN_ACTIVEQT -no-feature-PHONON_PLATFORMPLUGIN
-no-feature-PHONON_EFFECT -no-feature-PHONON_AUDIOCAPTURE
-no-feature-PHONON_EFFECTWIDGET -no-feature-PHONON_VOLUMEFADEREFFECT
-no-feature-PHONON_OBJECTDESCRIPTIONMODEL -no-feature-PHONON_VIDEO
-no-feature-PHONON_VIDEOPLAYER -no-feature-PHONON_SEEKSLIDER
-no-feature-PHONON_VOLUMESLIDER -no-feature-PHONON_MEDIACONTROLLER
-no-feature-PHONON_ABSTRACTMEDIASTREAM > config.log 2>&1

 

-Daniel

 

From: qt-embedded-interest-bounces at trolltech.com
[mailto:qt-embedded-interest-bounces at trolltech.com] On Behalf Of Daniel
Bowen
Sent: Sunday, June 14, 2009 2:23 AM
To: qt-embedded-interest at trolltech.com
Subject: [Qt-embedded-interest] Error 301
(QNetworkReply::ProtocolUnknownError) for requests running under embedded
Linux

 

I'm having trouble using QNetworkRequest under embedded Linux.  It's an ARM
9 core - arm_v5t_le.  I've built Qt for Embedded Linux 4.5.1 LGPL flavor for
the platform.  We're using MontaVista 5.

Essentially, QNetworkReply::error() always is giving me an error 301
(QNetworkReply::ProtocolUnknownError) for any URL I try to do a "GET" on.
The same code works fine on Windows and on x86 Linux (Ubuntu 9.04).  On
Windows, I'd gotten error 301 also when I first tried hitting an https:
address, which I soon found that I needed to build OpenSSL and rebuild Qt to
solve.  I have OpenSSL 0.9.8 for both my Linux-x86 and Linux-arm_v5t_le
environments  if that matters (the Linux-arm_v5t_le OpenSSL is a little bit
older - 0.9.8e).

However, with this problem under embedded Linux, I get the
ProtocolUnknownError whether I hit an http: address or a https: address.

I'm including full source for a test app that works on Windows and Linux
x86, but does not work under my embedded Linux environment.  It's a console
app that takes one command line argument - a URL for the resource to
download.  So it can be run with something like

        test http://doc.qtsoftware.com/4.5/how-to-learn-qt.html

<<...>> 

When I'm at the console on the embedded Linux box, I can ping things just
fine.  I can even run wget, and that downloads things just fine.  But the
test app (as well as the original code I was trying) always gets
ProtocolUnknownError.

What things can I try, or what might I be missing?  Any ideas would be
appreciated!

Thanks!

-Daniel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-embedded-interest/attachments/20090616/5a6fbc92/attachment.html 


More information about the Qt-embedded-interest mailing list