Discussion:
[X2Go-Dev] x2goclient-4.1.1.0 compile fails at link stage with undefined references
John Frankish
2018-02-13 07:56:59 UTC
Permalink
Using gcc-7.2.0 and qt-4.8.6

Is something missing?

make
...
g++ -lldap -lcups -lX11 -lXpm -Wl,-O1 -Wl,-rpath,/usr/local/lib -o x2goclient sharewidget.o settingswidget.o mediawidget.o configwidget.o sessionwidget.o connectionwidget.o configdialog.o editconnectiondialog.o exportdialog.o imgframe.o LDAPSession.o onmainwindow.o sessionbutton.o sessionmanagedialog.o sshmasterconnection.o sshprocess.o SVGFrame.o InteractionDialog.o userbutton.o x2gologdebug.o printprocess.o cupsprint.o cupsprintwidget.o cupsprintersettingsdialog.o printwidget.o printercmddialog.o printdialog.o wapi.o clicklineedit.o httpbrokerclient.o ongetpass.o x2gosettings.o brokerpassdlg.o contest.o xsettingswidget.o appdialog.o x2goutils.o helpdialog.o sessionexplorer.o folderbutton.o folderexplorer.o non_modal_messagebox.o help.o unixhelper.o compat.o pulsemanager.o x2goclient.o moc_configdialog.o moc_editconnectiondialog.o moc_exportdialog.o moc_imgframe.o moc_onmainwindow.o moc_sessionbutton.o moc_sessionmanagedialog.o moc_sshmasterconnection.o moc_sshprocess.o moc_SVGFrame.o moc_InteractionDialog.o moc_userbutton.o moc_printprocess.o moc_cupsprintwidget.o moc_cupsprintersettingsdialog.o moc_printwidget.o moc_printercmddialog.o moc_printdialog.o moc_sessionwidget.o moc_connectionwidget.o moc_settingswidget.o moc_mediawidget.o moc_sharewidget.o moc_clicklineedit.o moc_httpbrokerclient.o moc_brokerpassdlg.o moc_contest.o moc_xsettingswidget.o moc_appdialog.o moc_sessionexplorer.o moc_folderbutton.o moc_folderexplorer.o moc_pulsemanager.o qrc_resources.o -L/usr/local/lib -lssh -lssh_threads -lQtSvg -lQtGui -lQtNetwork -lQtCore -lpthread
sessionwidget.o: In function `SessionWidget::slot_emitSettings()':
sessionwidget.cpp:(.text+0xd70): undefined reference to `SessionWidget::settingsChanged(QString const&, QString const&, QString const&)'
sessionwidget.o: In function `SessionWidget::slot_rdpDirectClicked()':
sessionwidget.cpp:(.text+0x1154): undefined reference to `SessionWidget::directRDP(bool, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:262: x2goclient] Error 1
make[2]: Leaving directory '/usr/src/x2goclient-4.1.1.0/client_build'
make[1]: *** [Makefile:76: build_client] Error 2
make[1]: Leaving directory '/usr/src/x2goclient-4.1.1.0'
make: *** [Makefile:70: build] Error 2
Command exited with non-zero status 2
Mihai Moldovan
2018-02-15 02:53:54 UTC
Permalink
* On 02/13/2018 08:56 AM, John Frankish wrote:
> Using gcc-7.2.0 and qt-4.8.6
>
> Is something missing?
>
> make
> ...
> g++ -lldap -lcups -lX11 -lXpm -Wl,-O1 -Wl,-rpath,/usr/local/lib -o x2goclient sharewidget.o settingswidget.o mediawidget.o configwidget.o sessionwidget.o connectionwidget.o configdialog.o editconnectiondialog.o exportdialog.o imgframe.o LDAPSession.o onmainwindow.o sessionbutton.o sessionmanagedialog.o sshmasterconnection.o sshprocess.o SVGFrame.o InteractionDialog.o userbutton.o x2gologdebug.o printprocess.o cupsprint.o cupsprintwidget.o cupsprintersettingsdialog.o printwidget.o printercmddialog.o printdialog.o wapi.o clicklineedit.o httpbrokerclient.o ongetpass.o x2gosettings.o brokerpassdlg.o contest.o xsettingswidget.o appdialog.o x2goutils.o helpdialog.o sessionexplorer.o folderbutton.o folderexplorer.o non_modal_messagebox.o help.o unixhelper.o compat.o pulsemanager.o x2goclient.o moc_configdialog.o moc_editconnectiondialog.o moc_exportdialog.o moc_imgframe.o moc_onmainwindow.o moc_sessionbutton.o moc_sessionmanagedialog.o moc_sshmasterconnection.o moc_sshprocess.o moc_SVGFrame.o moc_InteractionDialog.o moc_userbutton.o moc_printprocess.o moc_cupsprintwidget.o moc_cupsprintersettingsdialog.o moc_printwidget.o moc_printercmddialog.o moc_printdialog.o moc_sessionwidget.o moc_connectionwidget.o moc_settingswidget.o moc_mediawidget.o moc_sharewidget.o moc_clicklineedit.o moc_httpbrokerclient.o moc_brokerpassdlg.o moc_contest.o moc_xsettingswidget.o moc_appdialog.o moc_sessionexplorer.o moc_folderbutton.o moc_folderexplorer.o moc_pulsemanager.o qrc_resources.o -L/usr/local/lib -lssh -lssh_threads -lQtSvg -lQtGui -lQtNetwork -lQtCore -lpthread
> sessionwidget.o: In function `SessionWidget::slot_emitSettings()':
> sessionwidget.cpp:(.text+0xd70): undefined reference to `SessionWidget::settingsChanged(QString const&, QString const&, QString const&)'
> sessionwidget.o: In function `SessionWidget::slot_rdpDirectClicked()':
> sessionwidget.cpp:(.text+0x1154): undefined reference to `SessionWidget::directRDP(bool, bool)'
> collect2: error: ld returned 1 exit status
> make[2]: *** [Makefile:262: x2goclient] Error 1
> make[2]: Leaving directory '/usr/src/x2goclient-4.1.1.0/client_build'
> make[1]: *** [Makefile:76: build_client] Error 2
> make[1]: Leaving directory '/usr/src/x2goclient-4.1.1.0'
> make: *** [Makefile:70: build] Error 2
> Command exited with non-zero status 2

... on what platform? Linux should at least have the directRDP function, though
Linux/kFreeBSD or the like might be different.



Mihai
John Frankish
2018-02-16 05:33:41 UTC
Permalink
> > Using gcc-7.2.0 and qt-4.8.6
> >
> > Is something missing?
> >
> > make
> > ...
> > g++ -lldap -lcups -lX11 -lXpm -Wl,-O1 -Wl,-rpath,/usr/local/lib -o x2goclient sharewidget.o settingswidget.o
> > mediawidget.o configwidget.o sessionwidget.o connectionwidget.o configdialog.o editconnectiondialog.o
> > exportdialog.o imgframe.o LDAPSession.o onmainwindow.o sessionbutton.o sessionmanagedialog.o
> > sshmasterconnection.o sshprocess.o SVGFrame.o InteractionDialog.o userbutton.o x2gologdebug.o printprocess.o
> > cupsprint.o cupsprintwidget.o cupsprintersettingsdialog.o printwidget.o printercmddialog.o printdialog.o
> > wapi.o clicklineedit.o httpbrokerclient.o ongetpass.o x2gosettings.o brokerpassdlg.o contest.o xsettingswidget.o
> > appdialog.o x2goutils.o helpdialog.o sessionexplorer.o folderbutton.o folderexplorer.o non_modal_messagebox.o
> > help.o unixhelper.o compat.o pulsemanager.o x2goclient.o moc_configdialog.o moc_editconnectiondialog.o
> > moc_exportdialog.o moc_imgframe.o moc_onmainwindow.o moc_sessionbutton.o moc_sessionmanagedialog.o
> > moc_sshmasterconnection.o moc_sshprocess.o moc_SVGFrame.o moc_InteractionDialog.o
> > moc_userbutton.o moc_printprocess.o moc_cupsprintwidget.o moc_cupsprintersettingsdialog.o
> > moc_printwidget.o moc_printercmddialog.o moc_printdialog.o moc_sessionwidget.o moc_connectionwidget.o
> > moc_settingswidget.o moc_mediawidget.o moc_sharewidget.o moc_clicklineedit.o
> > moc_httpbrokerclient.o moc_brokerpassdlg.o moc_contest.o moc_xsettingswidget.o moc_appdialog.o
> > moc_sessionexplorer.o moc_folderbutton.o moc_folderexplorer.o moc_pulsemanager.o qrc_resources.o
> > -L/usr/local/lib -lssh -lssh_threads -lQtSvg -lQtGui -lQtNetwork -lQtCore -lpthread
> > sessionwidget.o: In function `SessionWidget::slot_emitSettings()':
> > sessionwidget.cpp:(.text+0xd70): undefined reference to `SessionWidget::settingsChanged(QString const&,
> > QString const&, QString const&)'
> > sessionwidget.o: In function `SessionWidget::slot_rdpDirectClicked()':
> > sessionwidget.cpp:(.text+0x1154): undefined reference to `SessionWidget::directRDP(bool, bool)'
> > collect2: error: ld returned 1 exit status
> > make[2]: *** [Makefile:262: x2goclient] Error 1
> > make[2]: Leaving directory '/usr/src/x2goclient-4.1.1.0/client_build'
> > make[1]: *** [Makefile:76: build_client] Error 2
> > make[1]: Leaving directory '/usr/src/x2goclient-4.1.1.0'
> > make: *** [Makefile:70: build] Error 2
> > Command exited with non-zero status 2
> >
> ... on what platform? Linux should at least have the directRDP function, though
> Linux/kFreeBSD or the like might be different.
>
On linux
Which lib provides the directRDP function?

John
Mihai Moldovan
2018-02-17 01:21:14 UTC
Permalink
* On 02/16/2018 06:33 AM, John Frankish wrote:
> On linux
> Which lib provides the directRDP function?

There is no library. That's all Linux-#ifdef'd code. But given that the
implementation section is referencing for instance the
SessionWidget::directRDP(bool, bool) signal, it should work.

From the excerpt you've shown, I have no idea what you invoked and how so. I
also have no idea if the moc binary has been executed on relevant source files
and generated metaobjects code. If possible, please always paste *everything*,
not just the part that you may deem interesting.



Mihai
John Frankish
2018-02-19 06:12:26 UTC
Permalink
> > On linux
> > Which lib provides the directRDP function?
> >
> There is no library. That's all Linux-#ifdef'd code. But given that the
> implementation section is referencing for instance the
> SessionWidget::directRDP(bool, bool) signal, it should work.
>
> From the excerpt you've shown, I have no idea what you invoked and how so. I
> also have no idea if the moc binary has been executed on relevant source files
> and generated metaobjects code. If possible, please always paste *everything*,
> not just the part that you may deem interesting.
>
Build log from "make V=1" attached.
John Frankish
2018-02-27 11:34:34 UTC
Permalink
bump

________________________________
From: x2go-dev <x2go-dev-***@lists.x2go.org> on behalf of John Frankish <***@outlook.com>
Sent: Monday, February 19, 2018 10:12:26 AM
To: x2go-***@lists.x2go.org
Cc: Mihai Moldovan
Subject: Re: [X2Go-Dev] x2goclient-4.1.1.0 compile fails at link stage with undefined references

> > On linux
> > Which lib provides the directRDP function?
> >
> There is no library. That's all Linux-#ifdef'd code. But given that the
> implementation section is referencing for instance the
> SessionWidget::directRDP(bool, bool) signal, it should work.
>
> From the excerpt you've shown, I have no idea what you invoked and how so. I
> also have no idea if the moc binary has been executed on relevant source files
> and generated metaobjects code. If possible, please always paste *everything*,
> not just the part that you may deem interesting.
>
Build log from "make V=1" attached.
Stefan Baur
2018-03-19 17:31:29 UTC
Permalink
John,

This is a volunteer mailing list where most of the participants work
fulltime day jobs, not a web forum frequented by teens that spend their
afternoon in front of the computer because they have nothing better to
do with their free time.

So please do not try to "bump" posts.

If you need professional help with X2Go, because it's a time-critical
issue, and you are willing to pay money for it, have a look at
<https://wiki.x2go.org/doku.php/doc:professional-support> and pick a
support company there.

Kind Regards,
Stefan Baur (one of X2Go's list admins)

Am 27.02.2018 um 12:34 schrieb John Frankish:
> bump
>
> ------------------------------------------------------------------------
> *From:* x2go-dev <x2go-dev-***@lists.x2go.org> on behalf of John
> Frankish <***@outlook.com>
> *Sent:* Monday, February 19, 2018 10:12:26 AM
> *To:* x2go-***@lists.x2go.org
> *Cc:* Mihai Moldovan
> *Subject:* Re: [X2Go-Dev] x2goclient-4.1.1.0 compile fails at link stage
> with undefined references
>  
>> > On linux
>> > Which lib provides the directRDP function?
>> >
>> There is no library. That's all Linux-#ifdef'd code. But given that the
>> implementation section is referencing for instance the
>> SessionWidget::directRDP(bool, bool) signal, it should work.
>>
>> From the excerpt you've shown, I have no idea what you invoked and how so. I
>> also have no idea if the moc binary has been executed on relevant source files
>> and generated metaobjects code. If possible, please always paste *everything*,
>> not just the part that you may deem interesting.
>>
> Build log from "make V=1" attached.
>
>
>
> _______________________________________________
> x2go-dev mailing list
> x2go-***@lists.x2go.org
> https://lists.x2go.org/listinfo/x2go-dev
>


--
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243
Mihai Moldovan
2018-03-20 01:59:43 UTC
Permalink
* On 02/19/2018 07:12 AM, John Frankish wrote:
>>> On linux
>>> Which lib provides the directRDP function?
>>>
>> There is no library. That's all Linux-#ifdef'd code. But given that the
>> implementation section is referencing for instance the
>> SessionWidget::directRDP(bool, bool) signal, it should work.
>>
>> From the excerpt you've shown, I have no idea what you invoked and how so. I
>> also have no idea if the moc binary has been executed on relevant source files
>> and generated metaobjects code. If possible, please always paste *everything*,
>> not just the part that you may deem interesting.
>>
> Build log from "make V=1" attached.

There was a bug in the source code in the sense that it did connect two
unavailable signals on non-Linux platforms.

In your case, I observe that:

- You seem to be using a self-compiled version staged into /usr/local/.
- You have ANOTHER self-compiled version in /tmp/cloop/qt-4.x-dev which is
used as the mkspec location.
- Qt does not detect that you're using the linux-g++ mkspec which would make
x2goclient.pro add -D__linux__ to the compile flags. I am not sure why we
even have this, given that the compiler should set such a macro. From the
commit log, it looks like this is needed so that moc expands macros such as
Q_OS_LINUX, which is a known bug in Qt, c.f.,
https://bugreports.qt.io/browse/QTBUG-34593 and will probably never be fixed
for Qt 4.8 since it's EOL.

*Why* are you not using the Qt version as provided by your package manager? Why
are you rolling your own solution, if you are incapable of debugging and
handling such issues yourself?

The path /tmp/tcloop/qt-4.x-dev/usr/local/share/qt4/mkspecs/linux-g++ might not
even exist any longer. Who knows what compiler spec qmake falls back to.

I fixed the issue I found in x2goclient via
https://code.x2go.org/gitweb?p=x2goclient.git;a=commitdiff;h=1f383a9029ba1d1323c370c0deaaba379097c960

This likely won't help you, though, since the definitions as seen by your meta
object compiler (moc) and C++ compiler (g++) still won't match up.


Package maintainers normally go a great length to make sure that the packages
they build work correctly and handle bug reports. Subverting this by rolling
your own version is not as smart an idea as you might think it is.


Looking around, you seem to be using tinycorelinux, which stages non-core
software to /usr/local. That hints that it was installed there by a package
manager, but doesn't explain why qmake is trying to read spec files from
/tmp/tcloop/qt-4.x-dev. There's definitely something odd with your system or the
way these packages have been built.


Sorry, this is not a problem X2Go Client, but rather with your Qt libraries.



Mihai
Loading...