| We are currently requesting that all contributions to the project are licenced under the MIT licence. Find out why? |
WARNING: THIS GUIDE IS FOR ADVANCED USERS FOR USE IN BUILDING AND PORTING.
Table of Contents
Install NetBSD/i386 or NetBSD/amd64.
(versions from 5.1.2 to 7.0 have been tested)
For NetBSD 9.2, go to the following link from a user on the updated packages and instructions needed. When the autoconf version of CDE (v2.4.0a+) get's closer to a release, the current instructions will be mostly replaced with the contents of this post. NOTE: the patches described in that post should not be needed in current master as of 12/17/21.
NOTE: for documentation to build properly, you should increase the size of the /tmp partition. By default in 9.2, it's 10MB which will cause NodeParser to fail due to running out of space. I increased this to 256MB on a 4GB system. This resolved the NodeParser failure.
https://sourceforge.net/p/cdesktopenv/wiki/NetBSD/#c4bd
The following instructions are dated and will be updated at a later date.
The build expects the following packages under /usr/pkg:
All other required packages are installed as dependencies.
Note
If you are using pkgsrc to install these packages, please note that ast-ksh does not build in NetBSD 7.0 and it doesn't look like it is going to be fixed anytime soon. Check your PKG_PATH environment variable and make sure it contains:
ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/6.1/All/ (for the i386 version) or
ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/6.0/All/ (for the x64 version)
then install it by issuing pkg_add -v ast-ksh
As of February 2019 ast-ksh builds again with NetBSD 7.2, but fails for NetBSD 8.0. The 6.x binaries do however work fine in NetBSD 8.0.
As ast-ksh has been updated in 2020. It builds fine inthe current release NetBSD 9.
NOTE: For versions of CDE 2.3 or later, this step can be skipped. Use the OS packaged version of Motif.
Build Motif from source! This has to be done as root.
Download pkgsrc from http://ftp.netbsd.org/pub/pkgsrc/stable/pkgsrc.tar.gz
and install it under /usr
Change into motif directory:
cd /usr/pkgsrc/x11/motif
Build and install motif:
make
make install
Note
add the two lines
.include "../../x11/libXp/buildlink3.mk"
.include "../../x11/printproto/buildlink3.mk"
at the end of /usr/pkgsrc/mk/motif.buildlink3.mk or other Motif dependent packages will not build properly.
Add to /etc/rc.conf
rpcbind=YES rpcbind_flags="-l"
Add to /etc/rc.conf
rpcbind=YES rpcbind_flags="-l -i"
In addition, for versions of CDE prior to 2.3, you must add your hostname (uname -n) to the localhost line in /etc/hosts or ttsession will fail to start.
Add to "Files"-section of /etc/X11/xorg.conf
FontPath "/usr/pkg/share/fonts/X11/100dpi/"
FontPath "/usr/pkg/share/fonts/X11/75dpi/"
Reboot
Use the git clone command here:
On most platform you can use HTTPS:
git clone https://git.code.sf.net/p/cdesktopenv/code cdesktopenv-code
If that doesn't work (for instance some BSD distros) , use the native git protocol instead
git clone git://git.code.sf.net/p/cdesktopenv/code cdesktopenv-code
Or download the latest source release:
Note: The source archive will become out of date. When you want the latest code, clone the git repository.
NOTE: For CDE version 2.3 or later, this step can be skipped. However, as of Nov. 28th 2018 it is still required if you use the modular x-org from the pkgsrc system
If you use the native X11 installation that came with NetBSD, create the following symlinks
cd cdesktopenv-code/cde
mkdir -p imports/x11/include
ln -s /usr/X11R7/include/X11 imports/x11/include/
ln -s /usr/pkg/include/Xm imports/x11/include/
ln -s /usr/pkg/include/fontconfig imports/x11/include/
ln -s /usr/pkg/include/freetype2/ft2build.h imports/x11/include/
If you installed modular-xorg from the pkgsrc tree, create the following symlinks instead:
ln -s /usr/pkg /usr/X11R7
cd cdesktopenv-code/cde
mkdir -p imports/x11/include
ln -s /usr/X11R7/include/X11 imports/x11/include/
ln -s /usr/X11R7/include/Xm imports/x11/include/
ln -s /usr/X11R7/include/fontconfig imports/x11/include/
ln -s /usr/X11R7/include/freetype2/ft2build.h imports/x11/include/
Version 2.5.0 and newer (autoconf)
For the BSD's, you must use gmake, and you must specify the location of the TCL install directory (the below example assumes TCL v8.6).
$ ./autogen.sh
$ ./configure --with-tcl=/usr/local/lib/tcl8.6 MAKE="gmake"
$ gmake
$ sudo gmake install
Version 2.4.0 and earlier (imake) - deprecated
cd cdesktopenv-code/cde
make World
admin/IntegTools/dbTools/installCDE -s `pwd`
You can now start the CDE login manager as root:
/usr/dt/bin/dtlogin -nodaemon
Alternatively, you can start an X session as a normal user:
startx /usr/dt/bin/Xsession
I could finally put everything into work.
One step is missing dough or something needs to be fixed first to successfully build CDE entirely. As version 2.2.2 in Dec 2014, dtgreet, dtfile, dtfile-error and dtchooser won't build. So dtlogin won't work or App Manager and File manager either. The issue is freetype2. It couldn't find it. As a workaround I created symlinks directly in /usr/pkg/include/ folder to /usr/pkg/include/freetype2/ folder contents, i. e., put a link or copy every file to the parent folder. The same with the config subfolder inside freetype2, just link this folder to /usr/pkg/include/. Then everything will be created and worked.
If you copy the attached script, created by Akio Obata, modify the values @PREFIX@ y @VARBASE@ with /usr and /var, put in /etc/rc.d/ folder, chmod +x it and add to rc.conf >> dtlogin.sh=YES, you will have a full automatic graphical login.
Tested in NetBSD 6.1.5
Final touch is a logo. Grab the svg copy in http://upload.wikimedia.org/wikipedia/en/5/5c/NetBSD.svg modify it to delete the alpha channel, increase the canvas size to be a square and resize to the expected 239x239 pixels, everything in GIMP. Save it as XPM file and put it as Dtlogo.pm in the folder: /usr/dt/appconfig/icons/C
And everything is as it should. Well if you want a direct and 'exclusive' CDE experience.
As an addendum: nedit and mxterm, for example, will build succesfully if you modife their Makefiles and add this line:
.include "../../x11/printproto/buildlink3.mk"
Bye
Final logo for CDE login screen
I did a new build today, January the 9th, with a new fresh copy of CDE from git.
dtmail doesn't build. An error appear saying 'intptr_t' was not declared in this scope. The source file affected is dtmail/options_util.C
The fix is simple: put #include <stdint.h> in that specific file. Problem solved. Everything is build and installed.</stdint.h>
Bye
Just built the newest release from Git on NetBSD 7.0RC3 on Raspberry Pi 2. I had to make sure my hostname was in /etc/rc.hosts, and also had to change programs/dtinfo/DtMmdb/utility/atoi_pearson.C so that reg_t used the little-endian format. Dtinfo doesn't work (gives me errors about an unsupported platform), but other than that everything seems to be working well.
It should be noted that the patch for the x11/motif package Makefile breaks other motif-requiring packages, like NEdit, Xbae or Xpdf. You'll have to add includes of libXp and printproto buildlink3's manually to their Makefiles as well or they won't compile.
Some notes on NetBSD 7.0:
pkgsrc/shells/ast-ksh is broken. Install the binary package from the NetBSD 6.0 repository via pkg_add
CDE also needs fontconfig, so add another symlink after git'ing the sources
ln -s /usr/pkg/include/fontconfig imports/x11/include/
Just installed it on NetBSD 7.1.1 with one single problem: I already had (GNU) libiconv installed as a dependency for samba.
(Thanks for heads-up regarding ast-ksh; that would have been another one)
As far as I can tell, the trouble is caused by iconv.h present in /usr/pkg/include that redefines iconv to libiconv thus causing later linking errors.
My quick and dirty solution was to remove samba and libiconv, then do a rebuild (and reinstall them afterwards). Everything works fine using this approach. Nicer options would be to either add linker flags for libiconv (if iconv.h detected in /usr/pkg/include) or somehow avoid including iconv from /usr/pkg/include (but I'm not familiar enough with the build process).
TLDR: (GNU) libiconv from pkgsrc caused build failures. Solved by removing libiconv, building CDE and reinstalling libiconv.
Log exceprts:
This error (and many like it, not only when building dthelpview but others, including dtsession) were only evident in the log file (good idea to suggest one!); build process did not stop. The missing files were noticed at installation stage:
Latest CDE from git does not work properly on NetBSD 8.0 ADM64 and coredumps on aarch64 with ttsession cores
here are 2 screenshots from running on NetBSD 8.0 ADM64
CDE builds again on NetBSD-current without any problems as of April 19th 2020. To build it needs the latest NetBSD base system containing a fix to /usr/bin/awk, and the latest pkgsrc which contains fixes to the ast-ksh package. So, with luck it'll build on NetBSD 10 without any problems too.
http://www.netbsd.org/~ad/cde.png
Last edit: Andrew Doran 2020-04-19
Hi Andrew, when you mention "fix to /usr/bin/awk" it means that I should build it from source or reinstall it? I just downloaded 9.1 for sparc64, followed the steps, built ast-ksh from source, and my CDE build is crashing.
What I meant was that /usr/bin/awk was broken in NetBSD-current and core dumped trying to build CDE. I fixed it in NetBSD-current. It's probably okay in 9.1.
Seems like the build is broken on NetBSD. It bombs out on building the Italian documentation
The build fails in NetBSD 9.1.
Errors
gencat: unrecognized escape sequence on line 1893, datatypes.dt.tmsg
10040 ERRORE: \\"%(File)Arg_1%\\" non è una cartella.
dtdocbook fatal error:
Error processing book.out.sdl by ../../../programs/dthelp/parser/pass2/htag2/dthelp_htag2
*** Error code 1
Stop.
make[4]: stopped in /root/cdesktopenv-code/cde/doc/it_IT.ISO8859-1/help
*** Error code 1
Stop.
make[3]: stopped in /root/cdesktopenv-code/cde/doc/it_IT.ISO8859-1
*** Error code 1
Stop.
make[2]: stopped in /root/cdesktopenv-code/cde/doc
*** Error code 1
Stop.
make[1]: stopped in /root/cdesktopenv-code/cde
*** Error code 1
Stop.
make: stopped in /root/cdesktopenv-code/cde
Try with LANG=C maybe? Or make -k and ignore.
But be aware it's using imake so environment variables may be hardcoded into the generated Makefiles, so best to start with clean tree; perhaps 20 years since I used imake but maybe "make clean; make Makefiles" or something like that.
the .sdl help files are missing
Did you make any progress? I tried to build CDE yesterday on NetBSD 9.1 and it failed too.
Last edit: Leo Schneider 2020-12-04
Hi,
I haven't tried it with NetBSD 9.x nor tried building CDE recently. CDE is old and not very active so there are bound to be issues. It does need ast-ksh from pkgsrc to compile; the pdksh that ships with NetBSD is not sufficient. Suggestions: maybe try an older release tag of CDE if available. Maybe try running make a few times, make -k if you can watch it and ignore one or two missing components, or start with a clean tree and try building it with LANG=C in your environment. Other than that you'll need to debug the failures, sorry.
Andrew
Thanks Andrew. I tried installing gcc10 and use it instead of the gcc7 that comes by default with NetBSD 9.1 - no success... same problem regardless of compiler version. I will give it another try with the tips you gave. Cheers!
If you build with GCC 10, you need to use the latest git version. GCC 10
making -f-common a default option broke several sub-builds. Alternatively,
you could add -f-no-common to the CFLAGS and CXXFLAGS in cf/netbsd.cf
On Wed, 9 Dec 2020 at 09:42, Leo Schneider ttkdroid@users.sourceforge.net
wrote:
For whatever it's worth, I was able to build CDE on NetBSD 9.1/amd64 under virtualbox by typing:
LANG=C make -k World
As Andrew Doran suggested up-thread. This was using the system compiler (gcc 7.5.0), not one from pkgsrc.
I was able to compile and install CDE on NetBSD 9.2 using the latest git checkout (2021-08-04,
g93e280b0). Here are my notes for it.Fresh NetBSD 9.2, full installation with X11.
Prepare git
Requirements for cde
Configuration required by cde
Add to
/etc/rc.conf:Add to
/etc/X11/xorg.conf.d/01-fonts.conforxorg.conf:clone cde repository
Add some workarounds in code
These were needed with the version I checked out on 2021-08-04.
Build
Install
Post-install
The installation seemed to go fine, but dtterm was missing. It's built, though, so I just copied it manually. Probably more stuff is missing or broken, but I haven't done extensive testing.
Disable xdm in
/etc/rc.conf, if enabled.Add a startup script
/etc/rc.d/dtlogin:Add to
/etc/rc.conf:Hi, I've added you to the members list so you can edit this wiki if you so choose -- to make it easier for people to build on NetBSD.
I have also fixed the issues you reported - specifically the changes (diffs) you have provided. These are now in master.
The problem with dtterm not being installed has also been fixed and that is already in master as well.
Thanks!
I have compiled the software from git commit b0af0a49aa2dfdc1517ff6466fcd0f060f956fcf, Sat Aug 7 17:28:30 2021 -0600. on a NetBsd 9.2 amd64 system.
It all compiles out of the box, but one thing does not work:
When running dtlogin -daemon, then connecting via X server to it we can see the login banner.
When logging in, the screen goes black, to return back to the login screen after a few seconds.
It seems to mee that /usr/dt/bin/Xsession is not run.
If i login via ssh, exporting the DISPLAY to a X server, then running /usr/dt/bin/Xsession, this gives me a CDE desktop.
What could be the reason this does not work via dtlogin ?
Using version 2.4.0 git tag (old compile without autoconf), has not this problem.
My ultimate goal is to get CDE working under Netbsd for Sparc64, sparc32, later also on OpenBsd for SGI machines.
If this succeeds, this would be a perfect desktop for older machines, but still having recent C/C++ compilers on those old machines.
If somebody want to work together with me on this project, please take contact, and i'll hope we can reach my goals.
Current master build (17 Dec 2021) still has this exact same problem. If somebody wants to investigate, let me know what kind of logging is needed. If i need to support in some way by following and testing out a certain install procedure, building, whatever ,i want support in this.
Thanks for anyone working on CDE, it is still a great desktop.