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>
libXext-nx.so.6 => /usr/lib/libXext-nx.so.6 (0x0000002a9566e000)<br>
libX11-nx.so.6 => /usr/lib/libX11-nx.so.6 (0x0000002a9577e000)<br>
libz.so.1 => /usr/lib/libz.so.1 (0x0000002a95961000)<br>
libm.so.6 => /lib/libm.so.6 (0x0000002a95a75000)<br>
libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x0000002a95bfa000)<br>
libXcomp.so.1 => /usr/lib/libXcomp.so.1 (0x0000002a95d0b000)<br>
libXcompext.so.1 => /usr/lib/libXcompext.so.1 (0x0000002a95f2e000)<br>
libXrender-nx.so.1 => /usr/lib/libXrender-nx.so.1 (0x0000002a960c5000)<br>
libc.so.6 => /lib/libc.so.6 (0x0000002a961ce000)<br>
libdl.so.2 => /lib/libdl.so.2 (0x0000002a9640b000)<br>
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x0000002a9650e000)<br>
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x0000002a966ea000)<br>
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x0000002a96811000)<br>
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0000002a96932000)<br>
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0000002a96b3b000)<br>
/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>
if ((state->atoms[i] = repl->atom))<br>
_XUpdateAtomCache(dpy, state->names[i], (Atom) repl->atom,<br>
(unsigned long)0, idx, 0);<br>
<br>
This doesn't sound right. Should it be "if ((state->atoms[i] == repl->atom))"?<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->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>
if (aMap == NULL)<br>
{<br>
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> <<a href="mailto:linuster@gmail.com">linuster@gmail.com</a>> 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>
# define
_MACH64_NAME
"sparcv9"<br>
# elif defined(__ia64__)<br>
# undef MACH64_NAME<br>
# else<br></span>
# undef MACH64_NAME<br>
/*# error "Unknown architecture"<span class="q"><br>
*/<br>
# endif /* defined(__sparcv9) */<br>
# ifdef _MACH64_NAME<br>
# define
_MACH64_NAME_LEN (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> <<a href="mailto:linuster@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">linuster@gmail.com
</a>> 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 nxesd-1.5.0-3.tar.gz nxssh-1.5.0-21.tar.gz<br>
nxauth-1.5.0-1.tar.gz nxproxy-1.5.0-9.tar.gz nxuexec-1.5.0-3.tar.gz<br>
nxcomp-1.5.0-65.tar.gz nxscripts-1.5.0-11.tar.gz nxviewer-1.5.0-14.tar.gz<br>
nxcompext-1.5.0-16.tar.gz nxsensor-1.5.0-5.tar.gz nxwin-1.5.0-3.tar.gz<br>
nxdesktop-1.5.0-61.tar.gz nxspool-1.5.0-2.tar.gz nx-X11-1.5.0-15.tar.gz<br>
<br>
My progress so far:<br>
<br>
nxcomp: <br>
Need forward declaration patch in RenderExtension.h<br>
Need -fPIC in Makefile<br>
It builds after the patches<br>
<br>
nxproxy:<br>
builds OK<br>
<br>
nx-X11<br>
Need to unpack nxagent and nxauth after unpack nx-X11. They will be unpacked into<br>
nx-X11 directory as well.<br>
make World OK<br>
When make install, got XlcDL.c:64:4: #error "Unknown architecture"<br>
<br>
#ifdef _LP64<br>
# if defined(__sparcv9)<br>
# define _MACH64_NAME "sparcv9"<br>
# elif defined(__ia64__) <br>
# undef MACH64_NAME<br>
# else<br>
# error "Unknown architecture"<br>
# endif /* defined(__sparcv9) */<br>
# ifdef _MACH64_NAME<br>
# define _MACH64_NAME_LEN (sizeof (_MACH64_NAME) - 1)<br>
# endif<br>
#endif /* _LP64 */<br>
<br>
</blockquote></div><br>
</span></div></blockquote></div><br>