[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freenx-knx
Subject:    Re: [FreeNX-kNX] Compiling NX1.5.0 on amd64
From:       Xiong Jiang <linuster () gmail ! com>
Date:       2005-09-24 13:01:04
Message-ID: 9b5164430509240601109090ba () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Once nxagent is built in nx-X11/programs/Xserver/nxagent, you should be able
to start it like './nxagent :11'.

ldd ./nxagent shows if it is linked with the right libs.

amd64:/home/jxiong/NX/nx-X11/programs/Xserver# ldd ./nxagent
libXext-nx.so.6 => /usr/lib/libXext-nx.so.6 (0x0000002a9566e000)
libX11-nx.so.6 => /usr/lib/libX11-nx.so.6 (0x0000002a9577e000)
libz.so.1 => /usr/lib/libz.so.1 (0x0000002a95961000)
libm.so.6 => /lib/libm.so.6 (0x0000002a95a75000)
libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x0000002a95bfa000)
libXcomp.so.1 => /usr/lib/libXcomp.so.1 (0x0000002a95d0b000)
libXcompext.so.1 => /usr/lib/libXcompext.so.1 (0x0000002a95f2e000)
libXrender-nx.so.1 => /usr/lib/libXrender-nx.so.1 (0x0000002a960c5000)
libc.so.6 => /lib/libc.so.6 (0x0000002a961ce000)
libdl.so.2 => /lib/libdl.so.2 (0x0000002a9640b000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x0000002a9650e000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x0000002a966ea000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x0000002a96811000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0000002a96932000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0000002a96b3b000)
/lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)

I copied those libX11-nx, libXext-nx, libXrender-nx to /usr/lib so it's
easier for it to be located.

First problem I hit is at lib/X11/IntAtom.c:240

if ((state->atoms[i] = repl->atom))
_XUpdateAtomCache(dpy, state->names[i], (Atom) repl->atom,
(unsigned long)0, idx, 0);

This doesn't sound right. Should it be "if ((state->atoms[i] ==
repl->atom))"?
It's just my vague guess since the author may have omit a comment here
justifying the use of '='. This causes segfault later in _XUpdateAtomCache()
because the state->names[i] is invalid pointer.

Then I tried to make it as '=='. However I got problems in
programs/Xserver/hw/nxagent/Atoms.c:517

if (aMap == NULL)
{
Atom local = MakeAtom(name_list[i], strlen(name_list[i]), True);

The name_list[0] is a NULL pointer and it causes segfault in MakeAtom.

Maybe name_list is not correctly initialized in XInternAtoms() as I am
tampering with it.

Well, that's my attempt so far. Hope this is clear if any of you want to
continue the debugging. Btw, I had to add '-g' in Makefile to generate the
debug information. This is easy once you know the build commands to use.

I am still quite surprised about the package being released in such a shape.
Maybe NoMachine is short of resources as well.

Thanks,
Xiong

On 9/24/05, Xiong Jiang <linuster@gmail.com> wrote:
>
> OK, finally managed to build the stuff.
>
> at lib/X11/XlcDL.c:64, I made it like:
>
> #ifdef _LP64
> # if defined(__sparcv9)
> # define _MACH64_NAME "sparcv9"
> # elif defined(__ia64__)
> # undef MACH64_NAME
> # else
> # undef MACH64_NAME
> /*# error "Unknown architecture"
> */
> # endif /* defined(__sparcv9) */
> # ifdef _MACH64_NAME
> # define _MACH64_NAME_LEN (sizeof (_MACH64_NAME) - 1)
> # endif
> #endif /* _LP64 */
>
> I am not sure if it really matters. Just to make it compile.
>
> Now after nxcomp and nxcompext are built, you should be able to 'make
> World' under nx-X11. The directory names are hardcoded in makefile so you
> should not rename the directories unpacked from .tar.gz tarballs.
>
> Three libs are replaced by NX: libX11, libXext, libXrender.
> I changed in Makefile to use LIBNAME=X11-nx and Xext-nx, Xrender-nx for
> them. so that it's easier to distinguish it from the libX11 installed. I
> don't know much about the Imakefile system so I changed the Makefile and
> build again. Some other makefiles are modified accordingly as they will link
> with the libX11-nx, libXext-nx, libXrender-nx we just built.
>
> Again, I haven't found out how to change the Imake config files to do this
> easily. If you know the trick, please share with us.
>
> nxagent will be built when 'make' under nx-X11/programs. A problem here
> again:
> lib/freetype2 and fontconfig is not built as shared lib, but nxagent needs
> to link to it. Maybe I did something wrong here again by changing it to
> build a shared lib. But Imake gurus please point me to the right way.
>
> nxagent/Makefile also got problem that it cannot find the libX11-nx,
> libXext-nx, libXrender-nx.
>
> See, a deb source package will save me all the hassle of tampering with
> Makefile.
> However nx-X11 is not in svn://svn.debian.org/pkg-nx yet.
> I am write from my short memory in late night, my words here is so vague.
> I need to redo this and find the right answer.
>
> OK here is the story of compiling. It still doesn't work though.
>
> See my next email about the bugs I hit.
>
> Xiong
>
> On 9/24/05, Xiong Jiang <linuster@gmail.com> wrote:
> >
> > OK, let's start this thread for problems encountered in compiling NX on
> > debian-amd64.
> > I am trying gcc 3.3.6 first since I had failure with gcc4 on 1.4.0.2<http://1.4.0.2>before.
> >
> > I have the following source tarballs From
> > http://www.nomachine.com/sources.php:
> >
> > nxagent-1.5.0-90.tar.gz nxesd-1.5.0-3.tar.gz nxssh-1.5.0-21.tar.gz
> > nxauth-1.5.0-1.tar.gz nxproxy-1.5.0-9.tar.gz nxuexec-1.5.0-3.tar.gz
> > nxcomp-1.5.0-65.tar.gz nxscripts-1.5.0-11.tar.gz
> > nxviewer-1.5.0-14.tar.gz
> > nxcompext-1.5.0-16.tar.gz nxsensor-1.5.0-5.tar.gz nxwin-1.5.0-3.tar.gz
> > nxdesktop-1.5.0-61.tar.gz nxspool-1.5.0-2.tar.gz nx-X11-1.5.0-15.tar.gz
> >
> > My progress so far:
> >
> > nxcomp:
> > Need forward declaration patch in RenderExtension.h
> > Need -fPIC in Makefile
> > It builds after the patches
> >
> > nxproxy:
> > builds OK
> >
> > nx-X11
> > Need to unpack nxagent and nxauth after unpack nx-X11. They will be
> > unpacked into
> > nx-X11 directory as well.
> > make World OK
> > When make install, got XlcDL.c:64:4: #error "Unknown architecture"
> >
> > #ifdef _LP64
> > # if defined(__sparcv9)
> > # define _MACH64_NAME "sparcv9"
> > # elif defined(__ia64__)
> > # undef MACH64_NAME
> > # else
> > # error "Unknown architecture"
> > # endif /* defined(__sparcv9) */
> > # ifdef _MACH64_NAME
> > # define _MACH64_NAME_LEN (sizeof (_MACH64_NAME) - 1)
> > # endif
> > #endif /* _LP64 */
> >
> >
>

[Attachment #5 (text/html)]

Once nxagent is built in nx-X11/programs/Xserver/nxagent, you should be able to start it like './nxagent \
:11'. <br> <br>
ldd ./nxagent shows if it is linked with the right libs.<br>
<br>
amd64:/home/jxiong/NX/nx-X11/programs/Xserver# ldd ./nxagent<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libXext-nx.so.6 =&gt; /usr/lib/libXext-nx.so.6 \
(0x0000002a9566e000)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libX11-nx.so.6 =&gt; \
/usr/lib/libX11-nx.so.6 (0x0000002a9577e000)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libz.so.1 \
=&gt; /usr/lib/libz.so.1 (0x0000002a95961000)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libm.so.6 \
=&gt; /lib/libm.so.6 (0x0000002a95a75000)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libXpm.so.4 \
=&gt; /usr/X11R6/lib/libXpm.so.4 (0x0000002a95bfa000)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
libXcomp.so.1 =&gt; /usr/lib/libXcomp.so.1 (0x0000002a95d0b000)<br> \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libXcompext.so.1 =&gt; /usr/lib/libXcompext.so.1 \
(0x0000002a95f2e000)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libXrender-nx.so.1 =&gt; \
/usr/lib/libXrender-nx.so.1 (0x0000002a960c5000)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libc.so.6 \
=&gt; /lib/libc.so.6 (0x0000002a961ce000)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libdl.so.2 =&gt; \
/lib/libdl.so.2 (0x0000002a9640b000)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libX11.so.6 =&gt; \
/usr/X11R6/lib/libX11.so.6 (0x0000002a9650e000)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
libpng12.so.0 =&gt; /usr/lib/libpng12.so.0 (0x0000002a966ea000)<br> \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libjpeg.so.62 =&gt; /usr/lib/libjpeg.so.62 \
(0x0000002a96811000)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libstdc++.so.6 =&gt; \
/usr/lib/libstdc++.so.6 (0x0000002a96932000)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libgcc_s.so.1 \
=&gt; /lib/libgcc_s.so.1 (0x0000002a96b3b000)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
/lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)<br> <br>
I copied those libX11-nx, libXext-nx, libXrender-nx to /usr/lib so it's easier for it to be located.<br>
<br>
First problem I hit is at lib/X11/IntAtom.c:240<br>
<br>
&nbsp;&nbsp;&nbsp; if ((state-&gt;atoms[i] = repl-&gt;atom))<br>
&nbsp;&nbsp;&nbsp; _XUpdateAtomCache(dpy, state-&gt;names[i], (Atom) repl-&gt;atom,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; (unsigned long)0, idx, 0);<br>
<br>
This doesn't sound right. Should it be &quot;if ((state-&gt;atoms[i] == repl-&gt;atom))&quot;?<br>
It's just my vague guess since the author may have omit a comment here
justifying the use of '='. This causes segfault later in
_XUpdateAtomCache() because the state-&gt;names[i] is invalid pointer.<br>
<br>Then I tried to make it as '=='. However I got problems in \
programs/Xserver/hw/nxagent/Atoms.c:517<br> <br>
&nbsp;&nbsp;&nbsp; if (aMap == NULL)<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Atom local = MakeAtom(name_list[i], strlen(name_list[i]), True);<br>
<br>
The name_list[0] is a NULL pointer and it causes segfault in MakeAtom.<br>
<br>
Maybe name_list is not correctly initialized in XInternAtoms() as I am tampering with it.<br>
<br>
Well, that's my attempt so far. Hope this is clear if any of you want
to continue the debugging. Btw, I had to add '-g' in Makefile to
generate the debug information. This is easy once you know the build
commands to use.<br>
<br>
I am still quite surprised about the package being released in such a shape. Maybe NoMachine is short of \
resources as well.<br> <br>
Thanks,<br>
Xiong<br>
<br><div><span class="gmail_quote">On 9/24/05, <b class="gmail_sendername">Xiong Jiang</b> &lt;<a \
href="mailto:linuster@gmail.com">linuster@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> OK, \
finally managed to build the stuff.<br> <br>
at lib/X11/XlcDL.c:64, I made it like:<span class="q"><br>
<br>
#ifdef _LP64<br>
# if defined(__sparcv9)<br>
#&nbsp; define&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
_MACH64_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&quot;sparcv9&quot;<br>
# elif defined(__ia64__)<br>
#&nbsp; undef MACH64_NAME<br>
# else<br></span>
#&nbsp; undef MACH64_NAME<br>
/*#&nbsp; error &quot;Unknown architecture&quot;<span class="q"><br>
&nbsp;*/<br>
# endif /* defined(__sparcv9) */<br>
# ifdef _MACH64_NAME<br>
#&nbsp; define&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
_MACH64_NAME_LEN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (sizeof
(_MACH64_NAME) - 1)<br>
# endif<br>
#endif /* _LP64 */<br>
<br></span>
I am not sure if it really matters. Just to make it compile.<br>
<br>
Now after nxcomp and nxcompext are built, you should be able to 'make
World' under nx-X11. The directory names are hardcoded in makefile so
you should not rename the directories unpacked from .tar.gz tarballs.<br>
<br>
Three libs are replaced by NX: libX11, libXext, libXrender.<br>
I changed in Makefile to use LIBNAME=X11-nx and Xext-nx, Xrender-nx for
them. so that it's easier to distinguish it from the libX11 installed.
I don't know much about the Imakefile system so I changed the Makefile
and build again. Some other makefiles are modified accordingly as they
will link with the libX11-nx, libXext-nx, libXrender-nx we just built.<br>
<br>
Again, I haven't found out how to change the Imake config files to do this easily. If you know the trick, \
please share with us.<br> <br>
nxagent will be built when 'make' under nx-X11/programs. A problem here again:<br>
lib/freetype2 and fontconfig is not built as shared lib, but nxagent
needs to link to it. Maybe I did something wrong here again by changing
it to build a shared lib. But Imake gurus please point me to the right
way.<br><br>
nxagent/Makefile also got problem that it cannot find the libX11-nx, libXext-nx, libXrender-nx.<br>
<br>
See, a deb source package will save me all the hassle of tampering with Makefile.<br>
However nx-X11 is not in <a>svn://svn.debian.org/pkg-nx</a> yet.<br>
I am write from my short memory in late night, my words here is so vague. I need to redo this and find \
the right answer.<br> <br>
OK here is the story of compiling. It still doesn't work though.<br>
<br>
See my next email about the bugs I hit.<br><span class="sg">
<br>
Xiong</span><div><span class="e" id="q_106882c9abb13d76_6"><br>
<br><div><span class="gmail_quote">On 9/24/05, <b class="gmail_sendername">Xiong Jiang</b> &lt;<a \
href="mailto:linuster@gmail.com" target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">linuster@gmail.com </a>&gt; wrote:</span><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;"> OK, let's start this thread for problems encountered in compiling NX on \
debian-amd64.<br> I am trying gcc 3.3.6 first since I had failure with gcc4 on <a href="http://1.4.0.2" \
target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">1.4.0.2</a> before.<br> <br>
I have the following source tarballs From <a href="http://www.nomachine.com/sources.php" target="_blank" \
onclick="return top.js.OpenExtLink(window,event,this)">http://www.nomachine.com/sources.php</a>:<br> <br>
nxagent-1.5.0-90.tar.gz&nbsp;&nbsp;&nbsp; nxesd-1.5.0-3.tar.gz&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
nxssh-1.5.0-21.tar.gz<br> nxauth-1.5.0-1.tar.gz&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
nxproxy-1.5.0-9.tar.gz&nbsp;&nbsp;&nbsp;&nbsp; nxuexec-1.5.0-3.tar.gz<br> \
nxcomp-1.5.0-65.tar.gz&nbsp;&nbsp;&nbsp;&nbsp; nxscripts-1.5.0-11.tar.gz&nbsp; \
nxviewer-1.5.0-14.tar.gz<br> nxcompext-1.5.0-16.tar.gz&nbsp; nxsensor-1.5.0-5.tar.gz&nbsp;&nbsp;&nbsp; \
nxwin-1.5.0-3.tar.gz<br> nxdesktop-1.5.0-61.tar.gz&nbsp; nxspool-1.5.0-2.tar.gz&nbsp;&nbsp;&nbsp;&nbsp; \
nx-X11-1.5.0-15.tar.gz<br> <br>
My progress so far:<br>
<br>
nxcomp: <br>
&nbsp;&nbsp;&nbsp; Need forward declaration patch in RenderExtension.h<br>
&nbsp;&nbsp;&nbsp; Need -fPIC in Makefile<br>
&nbsp;&nbsp;&nbsp; It builds after the patches<br>
<br>
nxproxy:<br>
&nbsp;&nbsp;&nbsp; builds OK<br>
<br>
nx-X11<br>
&nbsp;&nbsp;&nbsp; Need to unpack nxagent and nxauth after unpack nx-X11. They will be unpacked into<br>
nx-X11 directory as well.<br>
&nbsp;&nbsp;&nbsp; make World OK<br>
&nbsp;&nbsp;&nbsp; When make install, got XlcDL.c:64:4: #error &quot;Unknown architecture&quot;<br>
<br>
#ifdef _LP64<br>
# if defined(__sparcv9)<br>
#&nbsp; define&nbsp;&nbsp;&nbsp; _MACH64_NAME&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&quot;sparcv9&quot;<br> # elif defined(__ia64__) <br>
#&nbsp; undef MACH64_NAME<br>
# else<br>
#&nbsp; error &quot;Unknown architecture&quot;<br>
# endif /* defined(__sparcv9) */<br>
# ifdef _MACH64_NAME<br>
#&nbsp; define&nbsp;&nbsp;&nbsp; _MACH64_NAME_LEN&nbsp;&nbsp;&nbsp; (sizeof (_MACH64_NAME) - 1)<br>
# endif<br>
#endif /* _LP64 */<br>
<br>

</blockquote></div><br>

</span></div></blockquote></div><br>



_______________________________________________
FreeNX-kNX mailing list
FreeNX-kNX@kde.org
https://mail.kde.org/mailman/listinfo/freenx-knx


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic