Showing posts with label debian testing. Show all posts
Showing posts with label debian testing. Show all posts

28 November 2012

286. Briefly: installing the dev.carbon-project.org wine 1.5.5 from debs

UPDATE 16 May 2013: See here for Wine 1.5.30: http://verahill.blogspot.com.au/2013/05/416-wine-1530-in-chroot.html

UPDATE (10th Jan 2013): See here for Wine 1.5.21 using the multiarch approach: http://verahill.blogspot.com.au/2013/01/308-compiling-wine-1521-on-debian.html

Update: Try this first: http://verahill.blogspot.com.au/2012/11/compiling-wine-155-from-source-using.html
It uses a lot less bandwidth, and involves compiling wine yourself, but using the build instructions from the carbon-project.org

Please Note
For bandwidth reasons please don't use this method if you are satisfied with the version you obtain through compiling by following this method: http://verahill.blogspot.com.au/2012/10/wine-1515-on-debian-testingwheezy.html



A long time ago (http://verahill.blogspot.com.au/2012/01/debian-testingwheezy-64-bit-installing.html) I posted three methods for installing Wine on Debian Testing:
1. Use the Squeeze version
2. Get the Wine-unstable build from http://dev.carbon-project.org/debian/wine-unstable/
3. Compile your own version

I've never managed to build Wine to successfully include OpenCL, gstreamer, or libgsm. Also, there are occasional issues with libjpeg, and I recently have problems with libOSMesa.

So here's an alternative solution for installing a relatively recent version of wine, and it involves no compiling.

Note that it seems that the Wine project uses the traditional way of numbering releases i.e. odd version are development versions i.e. the 1.4 series is stable, the 1.5 series is under development, and the 1.6 series will be the next stable.

Please note what it says on the carbon-dev page:
The amount of traffic this little sub-page generates is quite respectable. If you think this service helpful and want to help cover some of the attached costs, please donate a few Euros, either through PayPal, by flattring this or by donating through Flattr. Thank you! (You can, of course, also donate something, for totally different reasons.)
So at the very least don't download the same packages over and over and keep bandwidth to a minimum.

Anyway, here we go.

0. Clean up
Uninstall any newer version of wine if you've compiled e.g. 1.5.15.
sudo apt-get autoremove wine

1. Download
Get the debs for wine 1.5.5:
cd ~/tmp
mkdir wine-1.5.5
cd wine-1.5.5/
wget -r -l1 --no-parent -A amd64.deb http://dev.carbon-project.org/debian/wine-unstable/
FINISHED --2012-11-28 17:05:04-- Total wall clock time: 1m 1s Downloaded: 18 files, 65M in 54s (1.20 MB/s)
cd dev.carbon-project.org/debian/wine-unstable/

2. Install
sudo dpkg -i *.deb
Processing triggers for man-db ... Setting up libwine-alsa-unstable (1.5.5-0.1) ... Setting up libwine-bin-unstable (1.5.5-0.1) ... Setting up libwine-capi-unstable (1.5.5-0.1) ... Setting up libwine-cms-unstable (1.5.5-0.1) ... Setting up libwine-dbg-unstable (1.5.5-0.1) ... Setting up libwine-dev-unstable (1.5.5-0.1) ... Setting up libwine-gl-unstable (1.5.5-0.1) ... Setting up libwine-gphoto2-unstable (1.5.5-0.1) ... Setting up libwine-ldap-unstable (1.5.5-0.1) ... Setting up libwine-openal-unstable (1.5.5-0.1) ... Setting up libwine-oss-unstable (1.5.5-0.1) ... Setting up libwine-print-unstable (1.5.5-0.1) ... Setting up libwine-sane-unstable (1.5.5-0.1) ... Setting up wine-bin-unstable (1.5.5-0.1) ... Processing triggers for mime-support ... Processing triggers for gnome-menus ... Processing triggers for desktop-file-utils ... Setting up wine-unstable (1.5.5-0.1) ...

3. You're done

07 November 2012

277. Compiling LSDALTON on debian testing/wheezy

I'm writing this as a separate post even though it's really an integral part of the compilation of Dalton 2011 which I described here: http://verahill.blogspot.com.au/2012/11/compiling-dalton-2011-on-debian.html

LSDALTON supports Open MP which is neat -- it means you can't run across nodes, but it'll automatically take advantage of the resources on the node it's run on.

Anyway.

Assuming you've followed that post, you're now ready to compile LSDALTON.

cd ~/tmp/Dalton2011_release/LSDALTON/
./configure

There are fewer questions this time so I won't list them -- basically, use gfortran and gcc, and compile with OpenMP support.

This gives you a Makefile.config -- edit it as shown. Note that I have the debian libblas3 and libgomp1 packages installed.

ARCH        = linux
FMMDIR      = mm
#
#
CPPFLAGS      = -DSYS_LINUX -D_FILE_OFFSET_BITS=64 -D'INSTALL_BASDIR="/opt/dalton/basis"' -DGFORTRAN=471 -DVAR_LINSCA -DIMPLICIT_NONE
F77            = gfortran
F90            = gfortran
FLNK           = gfortran
CC             = gcc
RM             = rm -f
FFLAGS         = -march=native -O1 -ffast-math -funroll-loops -ftree-vectorize -ffloat-store -fno-whole-file
F90OPTFLAGS    = -march=native -O1 -ffast-math -funroll-loops -ftree-vectorize -ffloat-store -I. -x f95-cpp-input -ffloat-store -fopenmp -fno-whole-file
SAFEFFLAGS     = -march=native -O1 -ffast-math -funroll-loops -ftree-vectorize -ffloat-store -fno-whole-file
CFLAGS         = -march=native -O1 -ffast-math -funroll-loops -ftree-vectorize -std=c99 -DRESTRICT=restrict -DFUNDERSCORE=1 -ffloat-store -DUSE_UNDERSCORES
INCLUDES       =  
LIBS           = -lblas -lgomp 
INSTALLDIR     = /opt/dalton/bin
PDPACK_EXTRAS  = linpack.o eispack.o gp_dlapack.o gp_zlapack.o
AR             = ar
ARFLAGS        =  rvs
#
default : linux.x
#
# Suffix rules C
#
.SUFFIXES : .F90 .f90 .F .o .c

.F90.o:
        $(F90) $(INCLUDES) $(CPPFLAGS) $(F90OPTFLAGS) -c $*.F90

.f90.o:
        $(F90) $(INCLUDES) $(CPPFLAGS) $(F90OPTFLAGS) -c $*.f90

.F.o:
        $(F77) $(INCLUDES) $(CPPFLAGS) $(FFLAGS) -c $*.F

.c.o:
        $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $*.c

Now compile!
make

Test your installation:
cd test/
 ./TEST all
[..]
-----------------------------------------------------------
TEST ENDED PROPERLY

#####################################################################
                              Summary
#####################################################################

ALL TESTS ENDED PROPERLY!
date and time         : Wed Nov  7 14:57:29 EST 2012

06 November 2012

276. Compiling Dalton 2011 on Debian Testing/Wheezy

UPDATE: To deal with basis sets and 'GPOPEN' errors, see bottom of this post
UPDATE2: Because of the basis set issue the code doesn't run in parallel!
UPDATE 3: All issues are solved by -O0 or -O1. The code now works in parallel and you can define basis sets the usual way. Performance-wise? No idea. So you can compile with -O3 or -O2 but the code doesn't read basis sets the intended way, or you use -O1 or -O0 and it works.

THIS WORKS NOW  :)

Original post:
I've been wanting to use dalton for a long time, but it's been difficult to compile dalton 2.0, and I didn't realise until a few days ago that there's a newer version.
See here for a description of how to compile on ROCKS 5.4.3 (i.e. Centos 5.6) which uses gfortran v 4.1. The main difference between compiling on CentOS 5.6 and Debian Wheezy is in how you edit the Makefile.config. More specifically, compile works a whole lot better with -fno-whole-file and -march=native..

Other than that the steps are the same.

In terms of running, there's an issue with the discoverability of the basis sets which I don't really understand. There's a solution to that at the end of the file.

Before you get started you may want to compile ATLAS as shown here: http://verahill.blogspot.com.au/2012/05/compile-atlas-blas-on-debian-testing.html

Alternatively, you should get the ACML libraries.

NOTE: The compile went without a hitch on my AMD II X3, AMD Phenom II X6 and Intel i5-2400.
My AMF FX 8150 is a trickier story though: it failed to compile with acml libs (gfortran64_fma4_int64) for -O3 and -O2, but compiled with -O1 and -O0. The -O1 binary segfaults though. Never tried the -O0 binary.

WARNING: If you run dalton in parallel it will -- for some reason -- delete your scratch folder when the run is over. The scratch directory is defined in the  /opt/dalton/bin/dalton script (TMPDIR)

License:
First go to http://daltonprogram.org/licence/ and fill out the license agreement. Once that's done you'll get an automated email with a license form, which you should print, sign, scan and email to the email address you're given. Once your form has been processed you'll be sent another email with a user name and password. I received my user name and password the next business day.

Go online and download the source file, Dalton2011_release_v0.tgz, and put it in ~/tmp. Sort out where you want your program to end up
sudo mkdir /share/apps/dalton
sudo chown $USER /share/apps/dalton
mkdir /share/apps/dalton/bin /share/apps/dalton/basis /share/apps/dalton/lsdalton

Next,
cd ~/tmp
tar xvf Dalton2011_release_v0.tgz
cd Dalton2011_release/DALTON
./configure 

and answer all the questions:
./configure

------------------------------------------------------------------
   Configuring the DALTON Makefile.config and "dalton" run script
------------------------------------------------------------------

INFO: Operating system from 'uname -s' : Linux
INFO: Processor type   from 'uname -m' : x86_64
No architecture specified, attempting auto-configuration:
This appears to be a -linux architecture. Is this correct? [Y/n] 
--> Installing DALTON on a -linux computer


Note that 64-bit integers are desirable for Cholesky and very large
scale CI, otherwise the most important effect is that some files will be bigger.

If you choose 64-bit integers, be careful that any system library
routines (incl. MPI) also use 64-bit integers!

Do you want 64-bit integers? [y/N] Do you want to install the program in a parallel MPI version? [Y/n] 
-->WARNING: Makefiles for MPI architecture are difficult to guess
   Please compare the generated Makefile.config with local documentation.

   Checking for Fortran compiler ...
   from this list: mpif90 mpiifort ifort pgf95 pgf90 gfortran g95 

Compiler /usr/bin/mpif90 found, use this compiler? [Y/n] 
-->Compiler mpif90 found and accepted.
Is backend compiler gfortran ? [Y/n] 
   Checking for C compiler ...
   from this list: mpicc  mpiicc   icc ecc pgcc gcc 

Compiler /usr/bin/mpicc found, use this compiler? [Y/n] 
-->Compiler mpicc found and accepted.

Testing existence of libraries in this order:
 libacml.a libmkl.so libmkl_p3.a libatlas.a libblas.a
Directory search list for libraries:
  /opt/ATLAS/lib /home/me/tmp/ATLAS/build/lib /lib /usr/local/lib /usr/lib /usr/local/lib/ATLAS /lib64 /usr/lib64 /usr/local/lib64 

Do you want to replace this with your own directory search list? [y/N] Found /opt/ATLAS/lib/libatlas.a, use it? [Y/n] 
-->The following mathematical library(ies) will be used:
   -L/opt/ATLAS/lib -llapack -llapack -lf77blas -latlas


DALTON uses almost 100 Megabytes of static
allocations, in addition to the dynamic allocation.

DALTON has the possibility to reserve an amount of static memory
for storing two-electron integrals in direct and parallel calculations
Storing some or all of the 2-el. integrals in memory will speed up
direct and parallel calculations (and in particular the latter).
NOTE: This will increase the static memory allocation used by DALTON

Would you like to activate the possibility of storing 2-el.int. in memory? [y/N] How many MB to use for storing 2-el. integrals? 
-->Program will be installed with 300 MB (39000000 words) used for storing 2-el. integrals

Maximum amount of work memory for dynamic allocations can be changed
at run time with the environment variable WRKMEM (in REAL*8 words = megabytes/8)
or by using the -M option to the run script: "dalton -M mb ..." (in megabytes).
We recommend at least 200 MB work memory,
larger for correlated calculations, but it should for maximum
efficiency NOT exceed available physical memory per CPU in parallel calculations.

How many MB to use as default for work memory (hit return for default of 1000 MB)? 
-->Program will be installed with a default work memory of 3900 MB (511000000 words)

-->Current directory is /home/me/tmp/Dalton2011_release/DALTON

Use default ../bin as installation directory for DALTON binaries and scripts? [Y/n] Please enter another installation directory: 
-->DALTON executable and script will be placed in /opt/dalton/bin directory


-->Default basis set directory will be /home/me/tmp/Dalton2011_release/DALTON/../basis/

Use this directory as default basis set directory? [Y/n] 
Please choose another default basis set directory (must end with /) 
-->Default basis set directory will be /opt/dalton/basis/


-->Job specific directories under $SCRATCH/$USER
-->will be used for temporary files when running DALTON

Use SCRATCH=/work as default root scratch space in "dalton" run script? [Y/n] Please enter default root scratch directory: 
-->Creating Makefile.config ...
gfortran version 471 prc=x86_64
INFO: Compiling with 32-bit integers.
INFO: Make sure pre-compiled BLAS, MPI etc. libraries are also with 32-bit integers!!!

Proper 64-bit file access detected.

-->Creating the DALTON run-script in /opt/dalton/bin

   The configuration of DALTON has finished succesfully.
   Check compiler flags etc. in Makefile.config and run "make" to get executable.

which generates Makefile.config. Edit it and

  • change the -march to native. 
  • add -fno-whole-file to avoid internal compiler errors
  • change optimisation level to -O1 (O0 is ok, O2 and O3 give GPOPEN problems)

Like this:

ARCH        = linux
#
#
CPPFLAGS      = -DVAR_GFORTRAN -DSYS_LINUX -DVAR_MFDS -D'INSTALL_WRKMEM=131000000' -D'INSTALL_MMWORK=65000000' -D_FILE_OFFSET_BITS=64 -DVAR_MPI -DGFORTRAN=471 -DIMPLICIT_NONE
F90           = mpif90
CC            = mpicc
LOADER        = mpif90
RM            = rm -f
FFLAGS        = -march=native -O1 -ffast-math -funroll-loops -ftree-vectorize -fbacktrace -fno-whole-file
SAFEFFLAGS    = -march=native -O1 -ffast-math -funroll-loops -ftree-vectorize -fbacktrace -fno-whole-file
CFLAGS        = -march=native -O1 -ffast-math -funroll-loops -ftree-vectorize -std=c99 -DRESTRICT=restrict -DFUNDERSCORE=1
INCLUDES      = -I../include 
MODULES       = -J../modules
LIBS          = -L/opt/ATLAS/lib -llapack -llapack -lf77blas -latlas 
INSTALLDIR    = /opt/dalton/bin
PDPACK_EXTRAS = linpack.o eispack.o gp_zlapack.o gp_dlapack.o
GP_EXTRAS     = 
AR            = ar
ARFLAGS       = rvs
# flags for ftnchek on Dalton /hjaaj
CHEKFLAGS  = -nopure -nopretty -nocommon -nousage -noarray -notruncation -quiet  -noargumants -arguments=number  -usage=var-unitialized
# -usage=var-unitialized:arg-const-modified:arg-alias
# -usage=var-unitialized:var-set-unused:arg-unused:arg-const-modified:arg-alias
#
default : dalton linuxparallel.x
SAFE_FFLAGS_for_ifort = $(FFLAGS)
#
# Parallel initialization
#
MPI_INCLUDE_DIR = 
MPI_LIB_PATH    = -L/usr/lib
MPI_LIB         = -lmpi
#
#
# Suffix rules
# hjaaj Oct 04: .g is a "cheat" suffix, for debugging.
#               'make x.g' will create x.o from x.F or x.c with -g debug flag set.
#
.SUFFIXES : .F .F90 .c .o .i .g .s

.F.o:
        $(F90) $(INCLUDES) $(MODULES) $(CPPFLAGS) $(FFLAGS) -c $*.F 

.F.i:
        $(F90) $(INCLUDES) $(MODULES) $(CPPFLAGS) -E $*.F > $*.i

.F.g:
        $(F90) $(INCLUDES) $(MODULES) $(CPPFLAGS) $(SAFEFFLAGS) -g -c $*.F 

.F.s:
        $(F90) $(INCLUDES) $(MODULES) $(CPPFLAGS) $(FFLAGS) -S -g -c $*.F 

.F90.o:
        $(F90) $(INCLUDES) $(MODULES) $(CPPFLAGS) $(FFLAGS) -c $*.F90 

.F90.i:
        $(F90) $(INCLUDES) $(MODULES) $(CPPFLAGS) -E $*.F90 > $*.i




make
make install

Now just copy the basis sets and ecp data to the proper location:
cd ../
cp basis/* -R /opt/dalton/basis

and edit your ~/.bashrc;
export PATH=$PATH:/opt/dalton/bin

And you should be good to go.


So far I haven't run all the tests, but
./TEST -dalton /opt/dalton/bin/dalton short

gave
#####################################################################
                              Summary
#####################################################################

ALL TESTS ENDED PROPERLY!

date and time         : Wed Nov  7 11:57:02 EST 2012



GPOPEN errors and how to get around them.

To make the story short: if you use -O3 or -O2 for some reason Dalton can't find the basis sets if you declare them the normal way (-O0 and -O1 take care of the problem). However, using ATOMBASIS it works.

Here's an example. Typically you'd specify the basis set for a whole molecule in your .mol file:

BASIS
STO-3G
DFT PROPERTIES TEST 
This doesn't work with O3
AtomTypes=2 Angstrom
        8.    1     
O -0.141254 0.0998816 0.00000
        1.    2     
H 0.589315 0.718039 0.00000
H -0.922641 0.652406 0.00000

but that leads to errors on the debian (but not centos) builds:
   0: Directories for basis set searches:
     /jobs/dalton:/opt/dalton/basis

 MPI node no.:     0
 Reason: ERROR (GPOPEN) UPON OPENING A FILE


 Node      0:  --- SEVERE ERROR, PROGRAM WILL BE ABORTED ---
 ERROR (GPOPEN) UPON OPENING A FILE

and
  Atomic type no.    1
  --------------------
  Nuclear charge:   8.00000
  Number of symmetry independent centers:    1
  Number of basis sets to read;    2
  Basis set file used for this atomic type with Z =   8 :
     "/opt/dalton/basis/                                                                                "


--> ERROR (GPOPEN) UPON TRYING TO OPEN FILE ON UNIT 11
--> with filename /opt/dalton/basis/
--> IOSTAT ERROR CODE RETURNED      21


 QTRACE dump of internal trace stack

 ========================
      level    module
 ========================
          7    GPOPEN      
          6    BASLIB      
          5    READ_MOL    
          4    READIN      
          3    HERMIT      
          2    DALTON      
          1    DALTON main 

whereas

ATOMBASIS
DFT PROPERTIES TEST 
This works with O3
AtomTypes=2 Angstrom
        8.    1    basis=STO-3G 
O -0.141254 0.0998816 0.00000
        1.    2     basis=STO-3G
H 0.589315 0.718039 0.00000
H -0.922641 0.652406 0.00000

works and gives
   0: Directories for basis set searches:
     /opt/dalton/basis:/opt/dalton/basis

 NOTE:    1 informational messages have been issued.
 Check output, result, and error files for "INFO".

and a normal exit:
 CPU time statistics for ABACUS
 ------------------------------

 LINRES     00:00:02      77 %

 TOTAL      00:00:03     100 %


 >>>> Total CPU  time used in ABACUS:   3.21 seconds
 >>>> Total wall time used in ABACUS:   3.22 seconds


                   .-------------------------------------------.
                   | End of Static Property Section (ABACUS) - |
                   `-------------------------------------------'

 >>>> Total CPU  time used in DALTON:   6.04 seconds
 >>>> Total wall time used in DALTON:   6.06 seconds

 
     Date and time (Linux)  : Tue Nov  6 14:54:24 2012
     Host name              : beryllium   

28 October 2012

267. ECCE client connecting to remote site via reverse port/local port forwarding

The situation I'm about describe is quite specific, yet I don't think it's that unusual.

A. I've got a computer at work which is behind a firewall so that I can't connect directly to it from the outside. This will be referred to as Work.

B. I've got a laptop at home which is connected to a wireless  router. This will be referred to as Home.

C. The router is a Linksys/tomato router, which is accessible from the outside (myrouter.com). This will be referred to as Router.

I'd like to connect from home to my ecce server at work so that I can monitor and submit jobs.

At Work:
ssh -R 19997:localhost:8096 root@myrouter.com

At Home:
ssh -L 5555:localhost:19997 root@myrouter.com

We're basically tying together port 5555 at Home with port 8096 at Work, via an intermediary server.

At Home, edit your ecce/apps/siteconfig/Dataservers and change the relevant lines to

<eccedata>
  <ecceserver>
    <url>http://localhost:5555/Ecce</url>
    <desc>ECCE Data Server--remote</desc>
  </ecceserver>

  <basisset>http://localhost:5555/Ecce/system/GaussianBasisSetLibrary</basisset>
</eccedata>

Note that submission actually happens from your ecce client, not your server (i.e. from Home, not Work), so to get your submission scripts in order you may have to do a bit of fiddling. E.g. if you ecce server is also the queue master for an SGE batch system:

Work:
ssh -R 19999:localhost:22 root@myrouter.com

Home:
ssh -L 5454:localhost:19999 root@myrouter.com

Home:
Edit /apps/siteconfig/remote_shells.site and add
ssh_p5454: ssh -XC -p 5454|scp -P 5454|xterm

But you can read more about that here: http://verahill.blogspot.com.au/2012/05/port-redirection-with-eccenwchem.html

23 October 2012

264. Upgrade to ECCE 6.4 on Debian Testing

There's little reason to upgrade from 6.3 to 6.4 since
Other than open source availability and bundling the latest NWChem 6.1.1, the ECCE 6.4 release is otherwise equivalent to the 6.3 release.  
But it's always nice with some new and shiny.

For general instructions on how to install ecce from scratch, see e.g. http://verahill.blogspot.com.au/2012/06/ecce-in-virtual-machine-step-by-step.html

Upgrading
Go here to download the latest release. You will be asked to supply your name, email address and the name of your institution. However, you no longer need to register.

Download the file install_ecce.v6.4.rhel5-gcc4.1.2-m64.csh (full binary + builder). And yes, you can use wget for that.
Stop the ecce server if it's running:
 ~/.ecce/ecce-6.3e/server/ecce-admin/stop_ecce_server 

Make your ecce install file executable and run it:
chmod +x install_ecce.v6.4.rhel5-gcc4.1.2-m64.csh
./install_ecce.v6.4.rhel5-gcc4.1.2-m64.csh

which launches the installation:
Extracting ECCE distribution from ./install_ecce.v6.4.rhel5-gcc4.1.2-m64.csh...

Main ECCE installation menu
===========================
1) Help on main menu options
2) Prerequisite software check
3) Full install
4) Full upgrade
5) Application software install
6) Application software upgrade
7) Server install
8) Server upgrade

IMPORTANT: If you are uncertain about any aspect of installing
or running ECCE at your site, please refer to the detailed
ECCE Installation and Administration Guide at 
http://ecce.pnl.gov/docs/installation/2864B-Installation.pdf

Hit  at prompts to accept the default value in brackets.

Selection: [1] 4
Host name: [beryllium] 
New application installation directory: [/home/me/tmp/ecce-v6.4/apps] /home/me/.ecce/ecce-v6.4/apps
Existing application directory to upgrade: /home/me/.ecce/ecce-v6.3e/apps

Backup existing server user data (yes/no)? [yes]

ECCE v6.4 will be installed using the settings:

  Installation type: [full upgrade]
  Host name: [beryllium]
  Application installation directory: [/home/me/.ecce/ecce-v6.4/apps]
  Application directory to upgrade: [/home/me/.ecce/ecce-6.3e/apps]
  Server installation directory: [/home/me/.ecce/ecce-v6.4/server]
  Server directory to upgrade: [/home/me/.ecce/ecce-6.3e/server]
  Backup existing server user data: [yes]

Are these choices correct (yes/no/quit)? [yes] 
Installing ECCE application software in /home/me/.ecce/ecce-v6.4/apps...
  Extracting application distribution...
  Extracting NWChem binary distribution...
  Extracting NWChem common distribution...
  Extracting client WebHelp distribution...
  Configuring application software...
  Configuring NWChem...

Installing ECCE server in /home/me/.ecce/ecce-v6.4/server...
  Extracting data server in /home/me/.ecce/ecce-v6.4/server/httpd...
  Extracting data libraries in /home/me/.ecce/ecce-v6.4/server/data...
  Extracting Java Messaging Server in /home/me/.ecce/ecce-v6.4/server/activemq...
  Configuring ECCE server...
  Copying user data from server to be upgraded...
  Copying share data from server to be upgraded...

ECCE installation succeeded.

***************************************************************
!! You MUST perform the following steps in order to use ECCE !!
-- Unless only the user 'me' will be running ECCE,
   start the ECCE server as 'me' with:
     /home/me/.ecce/ecce-v6.4/server/ecce-admin/start_ecce_server

-- To register machines to run computational codes, please see
   the installation and compute resource registration manuals
   at http://ecce.pnl.gov/using/installguide.shtml

-- Before running ECCE each user must source an environment
   setup script.  For csh/tcsh users add this to ~/.cshrc:
     if ( -e /home/me/.ecce/ecce-v6.4/apps/scripts/runtime_setup ) then
       source /home/me/.ecce/ecce-v6.4/apps/scripts/runtime_setup
     endif
   For sh/bash users, add this to ~/.profile or ~/.bashrc:
     if [ -e /home/me/.ecce/ecce-v6.4/apps/scripts/runtime_setup.sh ]; then
       . /home/me/.ecce/ecce-v6.4/apps/scripts/runtime_setup.sh
     fi
***************************************************************

And then
/home/me/.ecce/ecce-v6.4/server/ecce-admin/start_ecce_server
/home/me/.ecce/ecce-v6.4/server/httpd/bin/apachectl start: httpd started
[1] 25382
INFO  BrokerService         
- ActiveMQ 5.1.0 JMS Message Broker (localhost) is starting
INFO  BrokerService      
- ActiveMQ JMS Message Broker (localhost, ID:beryllium-46481-1350964505499-0:0) started

Put the following in your ~/.bashrc

export ECCE_HOME=/home/me/.ecce/ecce-v6.4/apps
export PATH=${ECCE_HOME}/scripts:${ECCE_HOME}/scripts/parsers:${PATH}$

And run:
source ~/.bashrc
ecce

18 October 2012

259. Compiling firefox 16.0.1 in debian testing/wheezy

I actually mainly use chromium/chrome for my normal browsing needs, and have set up an ssh tunnel with an American university for iceweasel so I can access sites that filter on IP.

There's nothing particularly wrong with iceweasel, but it's nice to check out the latest and shiniest versions of different projects every now and again, so here's how to compile the latest firefox:

The source is just a hair under 90 Mb and the build takes around 40 minutes on a three-core AMD.

I've got so many -dev packages installed on my system that I don't really know what the dependencies are anymore, but here's a guess:
sudo apt-get install build-essential gfortran gawk libpango1.0-dev libgconf2-dev libgnomevfs2-dev libcogl-pango-dev libpangomm-1.4-dev libgconfmm-2.6-dev libnotify-dev libgnomeui-dev libdbus-1-dev libdbus-glib-1-dev 

Anyway:
cd ~/tmp
wget ftp://ftp.mozilla.org/pub/firefox/releases/16.0.1/source/firefox-16.0.1.source.tar.bz2
tar xvf firefox-16.0.1.source.tar.bz2
mkdir firefox_build
cd firefox_build/
../mozilla-release/./configure --prefix=$HOME/.firefox --disable-necko-wifi
make
make install

I'm getting tired of the clutter in my PATH, so
echo "alias firefox16='$HOME/.firefox/bin/firefox'" >> ~/.bashrc



Note that iceweasel puts a firefox in/usr/bin/, hence the use of firefox16

15 October 2012

257. Wine 1.5.15 on debian testing/wheezy --finally sorting out that annoying libjpeg

UPDATE 16 May 2013: See here for Wine 1.5.30: http://verahill.blogspot.com.au/2013/05/416-wine-1530-in-chroot.html

UPDATE (10th Jan 2013): See here for Wine 1.5.21 using the multiarch approach: http://verahill.blogspot.com.au/2013/01/308-compiling-wine-1521-on-debian.html

Pretty much just follow this post:
The big difference here is that it seems to compile ok with libjpeg.

And here are the release notes

Install the pre-requisites 
(haven't checked this list for a while -- there may be a few too many packages)
sudo apt-get install ia32-libs ia32-libs-dev bison flex gcc libc6-dev libfontconfig-dev libfreetype6-dev libglu-dev libgsm1-dev libice-dev libjpeg-dev libldap-dev libmpg123-dev libncurses5-dev libopenal-dev libpng-dev libsm-dev libssl-dev libusb-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxml2-dev libxrandr-dev libxrender-dev libxslt-dev libxt-dev libxxf86vm-dev make libcapi20-dev liblcms-dev libsane-dev libhal-dev libdbus-1-dev valgrind prelink libcups2-dev opencl-dev lib32opencl1 oss4-dev gettext lib32v4l-dev lib32ncurses5-dev lib32asound2-dev libtiff4-dev libgphoto2-2-dev


Get new source:
cd ~/tmp
wget http://sourceforge.net/projects/wine/files/Source/wine-1.5.15.tar.bz2
tar xvf wine-1.5.15.tar.bz2
cd wine-1.5.15/

To avoid
configure: WARNING: libjpeg 32-bit development files not found, JPEG won't be supported.

edit /usr/include/jpeglib.h and delete

24   #ifndef JCONFIG_INCLUDED        /* in case jinclude.h already did */
25   #include "jconfig.h"            /* widely used configuration options */
26   #endif

Then do 

./configure

which yields

configure: libOSMesa 32-bit development files not found (or too old), OpenGL rendering in bitmaps won't be supported.
configure: OpenCL 32-bit development files not found, OpenCL won't be supported.
configure: gstreamer-0.10 base plugins 32-bit development files not found, gstreamer support disabled
configure: libgsm 32-bit development files not found, gsm 06.10 codec won't be supported.
configure: Finished.  Do 'make' to compile Wine.

Neither of these issues are fatal -- depending on what you use wine for.

Time to install:
make
sudo checkinstall --install=no
sudo dpkg -i wine-1.5.15-1_amd64.deb

And you're done!

02 October 2012

251. Isotopic pattern and molecular weight calculator in Python for Linux

UPDATE: I've moved this code to https://sourceforge.net/projects/pyisocalc/

I'm not answering questions about this code -- it's a work in progress (updated every other day) and if you can't figure out how to use it  on your own, you're not the (currently) intended audience. For example, I've only had time to add a small subsection of the elements.

I originally implemented a very different solution -- a very exact and shiny one. The problem is that the number of permutations increases too rapidly, so that anything larger than e.g. B3(NO3)4 would use up 8 GB of RAM or more. 'Easy' molecules like C18 didn't use that much RAM, but still introduced a noticeable delay. Trimming the list of permutations introduces errors (small, hopefully) but speeds things up orders of magnitude.

In other words: this calculator is moderately fast (python), and very accurate (as far as I can tell). As I keep on looking at more and more complex examples for validation I find that I need to introduce various trimming functions to keep the matrices small.

Having said that, it's still kind of neat. Here's RuCl5^2- by my program and Matt Monroe's calculator (which I trust):


Monroe's output:


And plotting on top (scaled Monroe's by 1.08 to compensate for the error in scaling in Monroe's program which gives 108% abundance):


I removed the figures of W6O19^- since the error in the y axis scale in Monroe's program (went to 120%) made it a less good example, and the list of peaks is too long for easy comparison.
Here's another figure:
A hypothetical W6^- molecule


Anyway, here are a couple of syntax examples:

  Usage:
 ./isocalc 'Al2(NO3)3'
 ./isocalc 'Al2(NO3)3' -1
 ./isocalc 'Al2(NO3)3' -1 output.dat
 ./isocalc Al2N3O9 
  ./isocalc Al(NO3)3(OH)1
  ./isocalc Al(NO3)3(OH)
./isocalc Al

See here for the source code:
https://sourceforge.net/projects/pyisocalc/

01 October 2012

250. Compiling Kernel 3.6 on Debian Testing/Wheezy

IMPORTANT: a lot of drivers need to be explicitly enabled now, in particular those related to video devices (e.g. saa*, uvcvideo)

Nothing difficult or weird about compiling your own kernel, and 3.6 is no exception. This post is pretty much identical to my previous kernel compile posts, but with 3.6 replacing 3.x.
I've successfully compiled 3.6.0, 3.6.2, 3.6.3 and 3.6.6 this way.

If you're wondering whether it's worth it, you can have a look here:
 http://www.h-online.com/open/features/What-s-new-in-Linux-3-6-1714690.html

If you've never compiled a kernel before you might need to:
sudo apt-get install kernel-package fakeroot build-essential

Then get on with it:

wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.6.3.tar.bz2
tar xvf linux-3.6.3.tar.bz2
cd linux-3.6/
cat /boot/config-`uname -r`>.config
make oldconfig

You'll get a whole bunch of questions about what to include. See the end of the post for a list.

Video device drivers
Chances are that you will want to do
make menuconfig

and enable the compilation of various video device drivers e.g. go to Device drivers, Multimedia support, star (*) Cameras/video grabbers support, which enables Video Capture Adapters. Go to Video Capture Adapters and enable e.g. V4L USB devices/USB Video Class (m) to get your webcam working. You may need to enable other things too.

 Next:

make-kpkg clean
time fakeroot make-kpkg -j3 --initrd --revision=3.6.3 --append-to-version=-amd64 kernel_image kernel_headers

Building takes a while -- about 39 minutes on an AMD II X3.

mv ../*3.6.3*.deb .
sudo dpkg -i *.deb

And you're done!


What's new:

Expose hardware/virtual IRQ mapping via debugfs (IRQ_DOMAIN_DEBUG) [N/y/?] (NEW) *
Memory Resource Controller for Control Groups (MEMCG) [N/y/?] (NEW)
HugeTLB Resource Controller for Control Groups (CGROUP_HUGETLB) [N/y/?] (NEW)
Virtual (secure) IP: tunneling (NET_IPVTI) [N/m/?] (NEW)
NFQUEUE integration with Connection Tracking (NETFILTER_NETLINK_QUEUE_CT) [N/y/?] (NEW)
CAN Identifier (NET_EMATCH_CANID) [N/m/?] (NEW)     IPset (NET_EMATCH_IPSET) [N/m/?] (NEW)
Three-wire UART (H5) protocol support (BT_HCIUART_3WIRE) [N/y/?] (NEW)
Trace all mac80211 debug messages (MAC80211_MESSAGE_TRACING) [N/y/?] (NEW)   *
Driver for Broadcom BCM8706 and BCM8727 PHYs (BCM87XX_PHY) [N/m/?] (NEW) 
rt2800pci - Include support for rt3290 devices (EXPERIMENTAL) (RT2800PCI_RT3290) [Y/n/?] (NEW) 
MELFAS MMS114 touchscreen (TOUCHSCREEN_MMS114) [N/m/?] (NEW) 
EDT FocalTech FT5x06 I2C Touchscreen support (TOUCHSCREEN_EDT_FT5X06) [N/m/?] (NEW) 
Analog Devices AD-FMCOMMS1-EBZ SPI-I2C-bridge driver (SPI_XCOMM) [N/m/?] (NEW) 
BT8XX GPIO abuser (GPIO_BT8XX) [N/m/y/?] (NEW)   
AMD 8111 GPIO driver (GPIO_AMD8111) [N/m/y/?] (NEW)  
4096-Bit Addressable 1-Wire EEPROM with PIO (DS28E04-100) (W1_SLAVE_DS28E04) [N/m/?] (NEW)
Adaptive Voltage Scaling class support (POWER_AVS) [N/y/?] (NEW) *
Honeywell Humidicon HIH-6130 humidity/temperature sensor (SENSORS_HIH6130) [N/m/?] (NEW) 
BCMA Broadcom GBIT MAC COMMON core driver (BCMA_DRIVER_GMAC_CMN) [N/y/?] (NEW)
Support Wolfson Microelectronics Arizona platform with I2C (MFD_ARIZONA_I2C) [N/m/?] (NEW)
Support Wolfson Microelectronics Arizona platform with SPI (MFD_ARIZONA_SPI) [N/m/y/?] (NEW)
Cameras/video grabbers support (MEDIA_CAMERA_SUPPORT) [N/y/?] (NEW)  
Analog TV support (MEDIA_ANALOG_TV_SUPPORT) [N/y/?] (NEW) 
Digital TV support (MEDIA_DIGITAL_TV_SUPPORT) [N/y/?] (NEW)  
AM/FM radio receivers/transmitters support (MEDIA_RADIO_SUPPORT) [N/y/?] (NEW) 
Remote Controller support (MEDIA_RC_SUPPORT) [N/y/?] (NEW) 
Enable framebuffer console under vmwgfx by default (DRM_VMWGFX_FBCON) [N/y/?] (NEW)  
User-space I/O driver support for HID subsystem (UHID) [N/m/?] (NEW)  
Lenovo ThinkPad USB Keyboard with TrackPoint (HID_LENOVO_TPKBD) [N/m/?] (NEW) 
LED support for LM3556 Chip (LEDS_LM3556) [N/m/?] (NEW)  
LED support for the BlinkM I2C RGB LED (LEDS_BLINKM) [N/m/?] (NEW) 
LED One-shot Trigger (LEDS_TRIGGER_ONESHOT) [N/m/y/?] (NEW) 
EDAC legacy sysfs (EDAC_LEGACY_SYSFS) [Y/n/?] (NEW)  
VFIO Non-Privileged userspace driver framework (VFIO) [N/m/y/?] (NEW) *
Xen platform mcelog (XEN_MCE_LOG) [N/y/?] (NEW) *
Comedi misc drivers (COMEDI_MISC_DRIVERS) [N/y/?] (NEW) *
Comedi PCI drivers (COMEDI_PCI_DRIVERS) [N/y/?] (NEW) *
Comedi PCMCIA drivers (COMEDI_PCMCIA_DRIVERS) [N/y/?] (NEW) *
Comedi USB drivers (COMEDI_USB_DRIVERS) [N/y/?] (NEW) *
CSR wireless driver (CSR_WIFI) [N/m/?] (NEW) *
Pulse-Width Modulation (PWM) Support (PWM) [N/y/?] (NEW) *
Log kernel console messages (PSTORE_CONSOLE) [N/y/?] (NEW)   
Provide swap over NFS support (NFS_SWAP) [N/y/?] (NEW) 
Notifier error injection (NOTIFIER_ERROR_INJECTION) [N/m/y/?] (NEW)
Set upper limit of TLB entries to flush one-by-one (DEBUG_TLBFLUSH) [N/y/?] (NEW)
Serpent cipher algorithm (x86_64/AVX) (CRYPTO_SERPENT_AVX_X86_64) [N/m/y/?] (NEW) 
Twofish cipher algorithm (x86_64/AVX) (CRYPTO_TWOFISH_AVX_X86_64) [N/m/y/?] (NEW)   *
TCM_VHOST fabric module (EXPERIMENTAL) (TCM_VHOST) [N/m/?] (NEW) #

Links to this post:
http://forumubuntusoftware.info/viewtopic.php?f=117&t=8832
http://linux.org.ru/forum/linux-hardware/8339795
http://www.taringa.net/comunidades/ubuntuparataringeros/6513772/_ayuda_compilar-kernel-3_6-en-crunchbang.html
http://kenan.abdullahoglu.com/index.php/bilisim
http://crunchbang.org/forums/viewtopic.php?id=24484
http://forum.teneon.de/index.php?yshout&file=home&history&n=1000

16 September 2012

237. Briefly: Packet corrupt during ssh sessions

Whenever I'm using two subnets for my cluster I seems to be having problems with:
Corrupted MAC on input.
Disconnecting: Packet corrupt
It particularly happens when there's a lot of information being passed to the screen. It's a right killer when you're compiling on a remote system. However, while I've been able to get around that by running a GNU Screen session on the remote box it was time to solve it.\


I googled and found:
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.17/+bug/60764


The subnet I'm having issues with is operation across a switch. One of the computers on the network is defined as the gateway and I tend to have problems when connecting from it to the other computers on the network.
The gateway server has two interfaces, eth0 which is connected to a router which is connected to the outside world, and eth1 which is connected to the local subnet I'm having problems with.

The fix has been as as simple as
sudo apt-get install ethtool
sudo ethtool -K eth1 rx off tx off

I only had to run this on the gateway box and so far I've had no issues. Depending on how you're managing your network interfaces (i.e. wicd, network-manager, /etc/networking/*) you may want to add it to the post-up section of your /etc/network/interfaces:
post-up ethtool -K eth1 rx off tx off

Links to this post:
http://winscp.net/forum/viewtopic.php?t=12469

07 September 2012

229. Compile ATLAS (+ gromacs, nwchem) on AMD FX 8150 on Debian Testing (Wheezy)

Xianyi's openblas doesn't seem to be ready for AMD FX 8150 yet. I've played with ATLAS in the past, but  for some reason didn't see the same performance with NWChem and ATLAS as I saw with NWChem and Openblas, so I never ended up using it.

I'm also having issues using openblas with CPMD and quantum espresso, and ATLAS is a well-established, respectable project, so it's time to give it another shot. As in most cases in these situations, it's probably a matter of PEBKAC.

Building ATLAS
Anyway. On we go...

mkdir /opt/ATLAS
chown ${USER} /opt/ATLAS
mkdir ~/tmp
cd ~/tmp

wget http://www.netlib.org/lapack/lapack-3.4.1.tgz
 wget http://downloads.sourceforge.net/project/math-atlas/Developer%20%28unstable%29/3.9.72/atlas3.9.72.tar.bz2
tar xvf atlas3.9.72.tar.bz2
cd ATLAS/

Edit ATLAS/Make.top
change the V on line 6 to lowercase i.e. from
- $(ICC) -V 2>&1 >> bin/INSTALL_LOG/ERROR.LOGto
- $(ICC) -v 2>&1 >> bin/INSTALL_LOG/ERROR.LOG
mkdir build/
cd build/


sudo apt-get install cpufreq-utils
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
sudo cpufreq-set -g performance

Unfortunately that only takes care of cpu0:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
performance
but

cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
ondemand
So...since we have 8 cores (cpu0-cpu7):

sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor

OK, we're ready to compile:
.././configure --prefix=/opt/ATLAS -Fa alg '-fPIC' --with-netlib-lapack-tarfile=$HOME/tmp/lapack-3.4.1.tgz --shared

Some of the info that's important is:
OS configured as Linux (1)
Assembly configured as GAS_x8664 (2)
Vector ISA Extension configured as  AVXFMA4 (4,496)
Architecture configured as  AMDDOZER (34)
Clock rate configured as 3600Mhz
If that checks out you don't need to manually set your architecture. To get a list over options, do
 make xprint_enums ; ./xprint_enums

If all is well,

make
make install

You should now be done.

Linking Gromacs against ATLAS

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/openmpi/lib:/opt/ATLAS/lib
#single precision
export LDFLAGS="-L/opt/fftw/fftw-3.3.2/single/lib -L/opt/ATLAS/lib -lsatlas -ltatlas -lgfortran"
export CPPFLAGS="-I/opt/fftw/fftw-3.3.2/single/include -I/opt/ATLAS/include"
./configure --disable-mpi --enable-float --with-fft=fftw3 --with-external-blas --with-external-lapack --program-suffix=_spatlas --prefix=/opt/gromacs/gromacs-4.5.5
make -j6 2>make.err 1>make.log
make install

#double precision
make distclean
export LDFLAGS="-L/opt/fftw/fftw-3.3.2/double/lib -L/opt/ATLAS/lib -lsatlas -ltatlas -lgfortran" 
export CPPFLAGS="-I/opt/fftw/fftw-3.3.2/double/include -I/opt/ATLAS/include"
./configure --disable-mpi --disable-float --with-fft=fftw3 --with-external-blas --with-external-lapack --program-suffix=_dpatlas --prefix=/opt/gromacs/gromacs-4.5.5
make -j6 2>make2.err 1>make2.log
make install

#single + mpi
make distclean
export LDFLAGS="-L/opt/fftw/fftw-3.3.2/single/lib -L/opt/ATLAS/lib -lsatlas -ltatlas -lgfortran"
export CPPFLAGS="-I/opt/fftw/fftw-3.3.2/single/include -I/opt/ATLAS/include"
./configure --enable-mpi --enable-float --with-fft=fftw3 --with-external-blas --with-external-lapack --program-suffix=_spmpiatlas --prefix=/opt/gromacs/gromacs-4.5.5
make -j6 2>make3.err 1>make3.log
make install

#double + mpi
make distclean
export LDFLAGS="-L/opt/fftw/fftw-3.3.2/double/lib -L/opt/ATLAS/lib -lsatlas  -ltatlas  -lgfortran" 
export CPPFLAGS="-I/opt/fftw/fftw-3.3.2/double/include -I/opt/ATLAS/include"
./configure --enable-mpi --disable-float --with-fft=fftw3 --with-external-blas --with-external-lapack --program-suffix=_dpmpiatlas --prefix=/opt/gromacs/gromacs-4.5.5
make -j6 2>make4.err 1>make4.log
make install

Linking NWChem against ATLAS

export LARGE_FILES=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=`pwd`
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all"
export BLASOPT="-L/opt/ATLAS/lib -lsatlas -ltatlas"
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/usr/lib/openmpi/lib
export MPI_INCLUDE=/usr/lib/openmpi/include
export LIBRARY_PATH="$LIBRARY_PATH:/usr/lib/openmpi/lib:/opt/ATLAS/lib"
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
export LDFLAGS="-I/opt/ATLAS/include"
cd $NWCHEM_TOP/src
make clean
make nwchem_config
make FC=gfortran 2> make.err 1>make.log
export FC=gfortran
cd $NWCHEM_TOP/contrib
./getmem.nwchem

12 July 2012

207. apt-get, apt-cacher-ng and hash sum mismatch

Update: Another day and we're back to the same crap with Hash sum mismatches. It's getting old...however, I'm beginning to suspect it's not the mirror, but my apt-cacher-ng.

I was getting a bit peeved with getting intermittent messages about 'hash sum mismatch' etc. when trying to do sudo apt-get update

Ign http://dl.google.com stable/main Translation-en                                                                                                                                                                                         
Fetched 17.1 MB in 9s (1,736 kB/s)                                                                                                                                                                                                          
W: Failed to fetch bzip2:/var/lib/apt/lists/partial/192.168.1.1:3142_ftp.iinet.net.au_debian_debian_dists_testing_main_binary-amd64_Packages  Hash Sum mismatch

W: Failed to fetch bzip2:/var/lib/apt/lists/partial/192.168.1.1:3142_ftp.iinet.net.au_debian_debian_dists_testing_contrib_binary-amd64_Packages  Hash Sum mismatch

W: Failed to fetch bzip2:/var/lib/apt/lists/partial/192.168.1.1:3142_ftp.iinet.net.au_debian_debian_dists_testing_non-free_binary-amd64_Packages  Hash Sum mismatch

W: Failed to fetch bzip2:/var/lib/apt/lists/partial/192.168.1.1:3142_ftp.iinet.net.au_debian_debian_dists_testing_contrib_i18n_Translation-en  Hash Sum mismatch

W: Failed to fetch bzip2:/var/lib/apt/lists/partial/192.168.1.1:3142_ftp.iinet.net.au_debian_debian_dists_testing_main_i18n_Translation-en  Hash Sum mismatch

W: Failed to fetch bzip2:/var/lib/apt/lists/partial/192.168.1.1:3142_ftp.iinet.net.au_debian_debian_dists_testing_non-free_i18n_Translation-en  Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.


So I took action:
sudo rm -rf /var/cache/apt-cacher-ng/*

But then
sudo apt-get update    
Get:1 http://192.168.1.1 testing InRelease [190 kB]
Err http://192.168.1.1 testing InRelease                                                                                                                        
Ign http://192.168.1.1 stable InRelease                                                                                                                         
Get:2 http://192.168.1.1 stable Release.gpg [1,672 B]                                                                                    
..
Fetched 7,004 kB in 7s (965 kB/s)                                                                                                                                                                                                           
Reading package lists... Done
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://192.168.1.1 testing InRelease: File /var/lib/apt/lists/partial/192.168.1.1:3142_ftp.iinet.net.au_debian_debian_dists_testing_InRelease doesn't start with a clearsigned message

W: Failed to fetch http://192.168.1.1:3142/ftp.iinet.net.au/debian/debian/dists/testing/InRelease  

so I

sudo apt-get install debian-keyring

which didn't solve anything

Solution:
Edit you /etc/apt/sources.list and replace all instances of testing with wheezy, e.g.

deb http://192.168.1.1:3142/ftp.iinet.net.au/debian/debian/ wheezy main contrib non-free
deb http://192.168.1.1:3142/ftp.iinet.net.au/debian/debian/ stable main contrib non-free

I don't know if this has to do with the transition towards freezing wheezy, but basically, if you're having problems like that, have a look at what's actually on the mirror you're using. In my case I had a look at ftp://ftp.iinet.net.au/debian/debian/dists/ and found no 'testing' directory.


It also took care of these related messages on a different node:

Fetched 7,493 kB in 8s (885 kB/s)
W: Failed to fetch http://192.168.1.1:3142/ftp.iinet.net.au/debian/debian/dists/testing/contrib/binary-amd64/PackagesIndex  MD5Sum mismatch

W: Failed to fetch http://192.168.1.1:3142/ftp.iinet.net.au/debian/debian/dists/testing/contrib/i18n/Translation-enIndex  MD5Sum mismatch

W: Failed to fetch http://192.168.1.1:3142/ftp.iinet.net.au/debian/debian/dists/testing/non-free/binary-amd64/PackagesIndex  MD5Sum mismatch

W: Failed to fetch http://192.168.1.1:3142/ftp.iinet.net.au/debian/debian/dists/testing/non-free/i18n/Translation-enIndex  MD5Sum mismatch

W: Failed to fetch http://192.168.1.1:3142/ftp.iinet.net.au/debian/debian/dists/testing/main/i18n/Translation-enIndex  MD5Sum mismatch

W: Failed to fetch http://192.168.1.1:3142/ftp.iinet.net.au/debian/debian/dists/testing/main/binary-amd64/PackagesIndex  MD5Sum mismatch

17 June 2012

194. Wine 1.4.1 and Wine 1.5.6 on Debian Wheezy

UPDATE 16 May 2013: See here for Wine 1.5.30: http://verahill.blogspot.com.au/2013/05/416-wine-1530-in-chroot.html

There's great appetite for anything wine-related in Debian, as I can see from visitor numbers, so  here's how to build  Wine 1.4.1 and Wine 1.5.6 in Debian Testing/Wheezy. Enough talking -- let's get compilin'!

The builds take a little while, so be warned. Not all features are enabled in this particular build either -- see the configure output.

If you're interested in the missing development files seen below, this post might help: http://verahill.blogspot.com.au/2012/03/cross-compiling-eg-32-bit-binaries-on.html. Instinctively, I am suspicious as to whether that would work. I haven't explored it though, and my chief motivation is to make build instructions which anyone can easily follow and reproduce.

UPDATE (10th Jan 2013): See here for Wine 1.5.21 using the multiarch approach: http://verahill.blogspot.com.au/2013/01/308-compiling-wine-1521-on-debian.html


For both
sudo apt-get install bison flex gcc libc6-dev libfontconfig-dev libfreetype6-dev libglu-dev libgsm1-dev libice-dev libjpeg-dev libldap-dev libmpg123-dev libncurses5-dev libopenal-dev libpng-dev libsm-dev libssl-dev libusb-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxml2-dev libxrandr-dev libxrender-dev libxslt-dev libxt-dev libxxf86vm-dev make libcapi20-dev liblcms-dev libsane-dev libhal-dev libdbus-1-dev valgrind prelink libcups2-dev opencl-dev lib32opencl1 oss4-dev gettext lib32v4l-dev lib32ncurses5-dev lib32asound2-dev lib32z-dev ia32-libs-dev


Version 1.4.1
wget http://prdownloads.sourceforge.net/wine/wine-1.4.1.tar.bz2

tar xvf wine-1.4.1.tar.bz2
cd wine-1.4.1/
./configure
configure: OpenCL 32-bit development files not found, OpenCL won't be supported.
configure: gstreamer-0.10 base plugins 32-bit development files not found, gstreamer support disabled
configure: libgsm 32-bit development files not found, gsm 06.10 codec won't be supported.
configure: libtiff 32-bit development files not found, TIFF won't be supported.
configure: WARNING: libjpeg 32-bit development files not found, JPEG won't be supported.
configure: Finished.  Do 'make' to compile Wine.
make
sudo checkinstall --install=yes

Note: To just make a .deb package, do ---install=no.

Version 1.5.6
wget http://prdownloads.sourceforge.net/wine/wine-1.5.6.tar.bz2
tar xvf wine-1.5.6.tar.bz2
cd wine-1.5.6/
./configure

configure: OpenCL 32-bit development files not found, OpenCL won't be supported.
configure: libsane 32-bit development files not found, scanners won't be supported.
configure: gstreamer-0.10 base plugins 32-bit development files not found, gstreamer support disabled
configure: libgsm 32-bit development files not found, gsm 06.10 codec won't be supported.
configure: libtiff 32-bit development files not found, TIFF won't be supported.
configure: WARNING: libjpeg 32-bit development files not found, JPEG won't be supported.
configure: Finished.  Do 'make' to compile Wine.
make
sudo checkinstall --install=yes

Note: To just make a .deb package, do ---install=no.

10 June 2012

184. Fixing Gnome screenshot (3.4.1) in Debian Wheezy by patching and compiling

Approach
Putting a hold on gnome-screenshot forever will likely prevent gnome from upgrading properly since I'd suspect it's a required dependency.

Clarification: this fix restores the original behaviour. gnome-screenshot --interactive is NOT an acceptable solution. This guide restores gnome-screenshot to it's good old functional state.

So, time to build our own gnome-screenshot -- but one which actually works in a reasonable way. The gnome-screenshot cockup is just another sign that something is clearly amiss with the way gnome is being developed. And this, if true, is another truly idiotic 'feature' -- turn gnome into windows? Most of us left for a reason...

Anyway, linux is still sane though -- if we don't like something we're not entirely up a creek, which will buy us a bit more time while we're getting ready to move to xmonad  -- or for debian to move away from not making downstreams changes to gnome.

We have two options:
Either look here: http://git.gnome.org/browse/gnome-screenshot/commit/?id=3bbc1e158fd58ec7f4f984f6d3c15ec95e65a035&ignorews=1 and try to come up with your own way of reverting the crippling.

Or use the ubuntu patches as a guide: http://packages.ubuntu.com/precise/gnome-screenshot

Normally you shouldn't mix ubuntu and debian packages, and we won't: we'll be compiling our own package, but using the work done by the ubuntu maintainers.

In particular, look at this: http://archive.ubuntu.com/ubuntu/pool/main/g/gnome-screenshot/gnome-screenshot_3.4.1-0ubuntu1.debian.tar.gz

Look in the debian/patches directory and you'll find the ubuntu_interative_screenshots.patch

Building:
sudo apt-get install libgtk-3-dev libcanberra-gtk3-dev intltool
wget http://ftp.de.debian.org/debian/pool/main/g/gnome-screenshot/gnome-screenshot_3.4.1.orig.tar.xz
tar xvf gnome-screenshot_3.4.1.orig.tar.xz
cd gnome-screenshot-3.4.1/src

You can wget http://archive.ubuntu.com/ubuntu/pool/main/g/gnome-screenshot/gnome-screenshot_3.4.1-0ubuntu1.debian.tar.gz and untar it to look at the debian/patches/ubuntu_interactive_screenshots.patch, which what we do below is based on:

In the ubuntu patch there's a test to see whether unity is used. We'll do it a bit cruder -- we'll just make sure the condition is always true by testing for 0<1.


Edit src/screenshot-application.c and change the part in red

130 static void
131 save_pixbuf_handle_error (ScreenshotApplication *self,
132                           GError *error)
133 {
134   if (screenshot_config->interactive)
135     {
136       ScreenshotDialog *dialog = self->priv->dialog;
137       GtkWidget *toplevel = screenshot_dialog_get_toplevel (dialog);
138 
139       screenshot_dialog_set_busy (dialog, FALSE);
to

134   if (0 < 1)

Also, change

348   screenshot_play_sound_effect ("screen-capture", _("Screenshot taken"));
349 
350   if (screenshot_config->interactive)
351     {
352       self->priv->dialog = screenshot_dialog_new (self->priv->screenshot, self->priv->save_uri);
353       toplevel = screenshot_dialog_get_toplevel (self->priv->dialog);
354       gtk_widget_show (toplevel);
to


350   if (0 < 1 )

Time to build!
./configure --prefix=${HOME}/.gsc --program-suffix=.debugged
make
make install

Note: the install prefix here works fine for a single-user desktop. If you want everyone to be able to use our shiny new gnome-screenshot, put everything in /usr/bin instead.

We now have a working gnome screenshot in ~/.gsc that behaves as intended.
tree -L 2 -d
.
|-- bin
`-- share
    |-- applications
    |-- GConf
    |-- glib-2.0
    |-- gnome-screenshot
    |-- locale
    `-- man


 However, we need to make sure our fixed gnome-screenshot gets invoked.

In Gnome Shell 3.2.X
sudo apt-get install gconf-editor
Start gconf-editor
go to /apps/metacity/keybinding_commands/command_screenshot
change to e.g.  /home/verahill/.gsc/bin/gnome-screenshot.debugged
Also, change command_window_screenshot to
/home/verahill/.gsc/bin/gnome-screenshot.debugged --window

Note: defining Print/Alt+print keyboard shortcuts the 'gnome-shell' way (i.e. via system-settings) doesn't seem to work in gnome 3.2. Conversely, doing it the gconf-editor way in gnome 3.4 doesn't work.


In Gnome Shell 3.4.X
Go to System Settings, Keyboard, Shortcuts
Disable the automatically defined shortcuts for gnome-screenshot

And add your own under custom shortcuts:




Done! 
Unless you want to add to PATH in which case you can put this in your ~/.bashrc:
export PATH=$PATH:${HOME}/.gsc/bin




Note: If it's still not working, try to launch from the terminal. If you get
(gnome-screenshot.debugged:7493): GLib-GIO-ERROR **: Settings schema 'org.gnome.gnome-screenshot' does not contain a key named 'auto-save-directory'
Trace/breakpoint trap
it's because you had the old, good gnome-screenshot. 
sudo su
echo "gnome-screenshot install"|dpkg --set-selections
exit
sudo apt-get install gnome-screenshot

Now try
gsettings get org.gnome.gnome-screenshot auto-save-directory
which should be empty.

gsettings set org.gnome.gnome-screenshot auto-save-directory '/home/verahill/Pictures'

Finally, make sure to re-set your keybindings.



Links to this post:
http://qfox.nl/notes/153

08 June 2012

182. Oracle Java JDK (java, javac and javaws) in debian testing/wheezy

With ECCE I was having problems with getting the same version of java and javac on a computer where I was using sun java 6.0

Since I'm using SGE I (think I) need the closed source SUN java version.
Download (and click on the license agreement) here:
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u32-downloads-1594644.html


(v7u4 is available here:
http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u4-downloads-1591156.html
)


Then follow this: http://verahill.blogspot.com.au/2012/04/installing-sunoracle-java-in-debian.html
sudo apt-get install java-package
make-jpkg jdk-6u32-linux-x64.bin

and follow the instructions. Once the package is built, install:
sudo dpkg -i oracle-j2sdk1.6_1.6.0+update32_amd64.deb

Unpacking oracle-j2sdk1.6 (from oracle-j2sdk1.6_1.6.0+update32_amd64.deb) ...
Setting up oracle-j2sdk1.6 (1.6.0+update32) ...
update-alternatives: using /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/ControlPanel to provide /usr/bin/ControlPanel (ControlPanel) in auto mode.
update-alternatives: using /usr/lib/jvm/j2sdk1.6-oracle/jre/lib/amd64/libnpjp2.so to provide /usr/lib/iceweasel/plugins/libjavaplugin.so (iceweasel-javaplugin.so) in auto mode.
update-alternatives: using /usr/lib/jvm/j2sdk1.6-oracle/jre/lib/amd64/libnpjp2.so to provide /usr/lib/chromium/plugins/libjavaplugin.so (chromium-javaplugin.so) in auto mode.
sudo update-alternatives --config java
There are 6 choices for the alternative java (providing /usr/bin/java).
  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      auto mode
  1            /usr/bin/gij-4.4                                 1044      manual mode
  2            /usr/bin/gij-4.6                                 1046      manual mode
* 3            /usr/lib/jvm/j2re1.6-oracle/bin/java             314       manual mode
  4            /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java        315       manual mode
  5            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
  6            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1051      manual mode
sudo update-alternatives --config javac
There are 2 choices for the alternative javac (providing /usr/bin/javac).
  Selection    Path                                         Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-7-openjdk-amd64/bin/javac   1051      auto mode
  1            /usr/lib/jvm/j2sdk1.6-oracle/bin/javac        315       manual mode
  2            /usr/lib/jvm/java-7-openjdk-amd64/bin/javac   1051      manual mode
sudo update-alternatives --config javaws
There are 3 choices for the alternative javaws (providing /usr/bin/javaws).

  Selection    Path                                              Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws   1061      auto mode
* 1            /usr/lib/jvm/j2re1.6-oracle/bin/javaws             314       manual mode
  2            /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/javaws        315       manual mode
  3            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws   1061      manual mode




While I was making the package this little guy popped up. Don't fret. I think it was meant to take me to the java.com website or something similar. I don't like the sight of that /root/ thingy though -- what's oracle thinking of us punters?





05 May 2012

138. Compile ATLAS blas on debian testing

I first tried the latest stable and gave up due to "ERROR 639 DURING CACHE EDGE DETECTION!!" errors. Hence, I used unstable.

Start here

mkdir /opt/ATLAS
chown ${USER}  /opt/ATLAS
mkdir ~/tmp
cd ~/tmp
 wget http://downloads.sourceforge.net/project/math-atlas/Developer%20%28unstable%29/3.9.72/atlas3.9.72.tar.bz2


tar xvf atlas3.9.72.tar.bz2
cd ATLAS/


Edit ATLAS/Make.top 
change the V on line 6 to lowercase i.e. from
- $(ICC) -V 2>&1  >> bin/INSTALL_LOG/ERROR.LOG
to
- $(ICC) -v 2>&1  >> bin/INSTALL_LOG/ERROR.LOG

mkdir build/
cd build/
sudo apt-get install cpufrequtils

Since I don't like computers overheating I normally throttle my cpu. To unset throttling on a AMD64 (phenom II) six core system, before compile:
/usr/bin/cpufreq-selector -g performance
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor

Alternatively, you can disable throttle checking using the -Si cputhrchk 0 configure switch. If you don't, and throttling is on, configure will fail.

OK, continuing with the build, in your build/ directory:

.././configure --prefix=/opt/ATLAS -A AMD64

Before you continue, do
make xprint_enums ; ./xprint_enums
and study the output -- you might find a better ARCH fit than e.g. AMD64.  If so, run the configure command above again. There is a lot of other options which you can configure as well. Obviously, nothing prevents you from experimenting and re-compiling if something goes wrong. You can also run without any -A switch at all.

Continuing:
make
make install
cp lib/lib* /opt/ATLAS/lib

Your libs should be in /opt/ATLAS/lib -- when you compiled something to include the new libs, use
"-L/opt/ATLAS/lib"

03 May 2012

131. Sort of Fixed: Gnome-screenshot (3.4.1) broken in debian testing -- how to fix it

UPDATE 9/6/2012: It's becoming incrasingly difficult to revert back to the old version of gnome-screenshot, hence the changed title of the post. I can't believe the gnome-screenshot hasn't been reverted back to a more sane behaviour -- any behaviour that leads to a score of bug reports (remember that there's a lot of self-censorship as few people submit bug reports even if they encounter a bug) is highly undesirable. I would not include screenshot in my posts if I hadn't already put a hold on my gnome-screenshot package. Anyway, keep an eye on this one for (a lack of) updates: https://bugzilla.gnome.org/show_bug.cgi?id=669629

Original post
Something weird happened after the updates today (http://verahill.blogspot.com.au/2012/05/todays-3rd-of-may-2012-debian.html). When taking screenshots I didn't get a save dialogue.

I naturally presumed this to be a crippling bug:

gnome-screenshot

** (gnome-screenshot:8520): WARNING **: Unable to use GNOME Shell's builtin screenshot interface, resorting to fallback X11. Error: GDBus.Error:org.freedesktop.DBus.Error.Failed: Error: Expected type utf8 for Argument 'filename' but got type 'boolean' (nil)
After reading bug reports I noticed that a new screenshot shows up in the ~/Pictures folder -- but you get no dialogue re saving and name etc, so I might be forgiven for thinking that it didn't work at all. Yet, something was clearly out of whack.

Yes. The broken behaviour is a design feature. It's idiotic.

I like gnome-shell now that I've customized it. But seriously, what the gnome devs want as default behaviour can only be considered as broken behaviour by any long term desktop user. This new behaviour is idiotic and will only benefit those who don't use screenshot very often  -- those who do will definitely want control over where screenshots are saved and under what names.

The worst, intended 'solution':
If I would guess at the intentions of the gnome dev/s, they'd suggest you map your print scrn key to gnome-screenshot -i. This brings up a dialogue. Asking you to select full screen, window or area. You can then click on take screen shot, and you then get the save dialogue. Suddenly it got a lot less convenient. Something that was quick and easy now has become clunky.

The better solution:
I used the snapshot archive:

1. Download the previous version, e.g. 
wget http://snapshot.debian.org/archive/debian/20120313T034114Z/pool/main/g/gnome-utils/gnome-screenshot_3.2.1-3_amd64.deb

2. And install
 sudo dpkg -i gnome-screenshot_3.2.1-3_amd64.deb 
dpkg: warning: downgrading gnome-screenshot from 3.4.1-1 to 3.2.1-3.
3. Prevent the package from being upgraded again:
sudo su
echo "gnome-screenshot hold"|dpkg --set-selections

The behaviour should now be back to usable.

This post contained no screenshots. For obvious reasons.

Links to this post:
http://qfox.nl/notes/153

130. Today's (3rd of May 2012) debian wheezy/testing updates -- Confused

You may want to be careful if you do dist-upgrade today.

Today
sudo apt-get dist-upgrade
gave

The following packages will be REMOVED:
  gnome gnome-desktop-environmentThe following NEW packages will be installed:
  gir1.2-gdesktopenums-3.0 iputils-tracepath
The following packages have been kept back:
  libboost-date-time-dev libboost-dev libboost-regex-dev libboost-signals-dev libgl1-nvidia-glx libmono-winforms2.0-cil nvidia-alternative nvidia-glx nvidia-kernel-dkms nvidia-vdpau-driver python-pyatspi2 xserver-xorg-video-nvidia
The following packages will be upgraded:
  gnome-core gnome-nettool gsettings-desktop-schemas gsettings-desktop-schemas-dev
No worries there, so I continued.

However, having seen the removal of gnome, gnome-core etc. cause issues before (http://verahill.blogspot.com.au/2012/04/fixed-no-internet-on-old-dell-after.html) I did
apt-get -s autoremove
afterwards.

The following packages will be REMOVED:
  abiword abiword-common abiword-plugin-grammar abiword-plugin-mathview aisleriot cheese ekiga file-roller gdebi gedit gedit-common gedit-plugins gir1.2-gdata-0.0 gir1.2-goa-1.0 gir1.2-gucharmap-2.90 gir1.2-javascriptcoregtk-3.0 gir1.2-rb-3.0 gir1.2-tracker-0.14 gir1.2-webkit-3.0 glchess glines gnect gnibbles gnobots2 gnome-cards-data gnome-documents gnome-games gnome-games-data gnome-games-extra-data gnome-nettool gnome-sudoku gnome-video-effects gnomine gnotravex gnotski gnuchess gnuchess-book gnumeric gnumeric-common grilo-plugins-0.1 gtali hamster-applet iagno iputils-tracepath libabiword-2.9 libatk-adaptor-schemas libboost-date-time1.49.0 libboost-serialization1.49.0 libboost-signals1.49.0 libcec1 libdmapsharing-3.0-2 libgdome2-0 libgdome2-cpp-smart0c2a libgexiv2-0 libgpod-common libgpod4 libgrilo-0.1-0 libgtkmathview0c2a libgupnp-av-1.0-2 libhal-storage1 liblink-grammar4 libmagick++4 libmagickcore4 libmagickcore4-extra libmagickwand4 libminiupnpc5 libnatpmp1 libnet1 libnfs1 libopal3.10.4 libots0 libpt2.10.4 librhythmbox-core5 libwv-1.2-4 liferea liferea-data link-grammar-dictionaries-en mahjongg media-player-info minissdpd python-evolution python-wnck quadrapassel rhythmbox rhythmbox-data rhythmbox-plugin-cdrecorder rhythmbox-plugins seahorse shotwell simple-scan sound-juicer tcptraceroute telepathy-idle transmission-common transmission-gtk unoconv xdg-user-dirs-gtk
  ... 97 to remove and 12 not upgraded.
Yeah, that doesn't sound good - I use seahorse, ekiga etc.

If the package version is given (libboost-date-time1.49.0) it's often ok to remove. But removing un-versioned packages is a better indication of something major being underway.

Anyway, taking a quick gander at gnome-desktop-enviroment which got removed:

Package: gnome-desktop-environment    
State: not installed
Version: 1:3.0+8
Priority: optional
Section: gnome
Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Architecture: all
Uncompressed Size: 43.0 k
Depends: gnome (>= 1:3.0+8)
Description: The GNOME Desktop Environment - transitional package
 This is the GNOME Desktop environment, an intuitive and attractive desktop.

 This meta-package is obsolete and has been replaced by “gnome”.

Then checking gnome (which also got removed):

  Package: gnome                        
State: not installed
Version: 1:3.0+8
Priority: optional
Section: gnome

Seems like gnome got marked for removal although it shouldn't have been.

sudo apt-get install gnome
followed by
sudo apt-get -s autoremove
 The following packages will be REMOVED:
  dasher dasher-data gnome-accessibility-themes libboost-date-time1.49.0 libboost-serialization1.49.0 libboost-signals1.49.0 libcec1 libgail-gnome-module libhal-storage1 libmagick++4 libmagickcore4 libmagickcore4-extra libmagickwand4
  libnet1 libnfs1 tcptraceroute
0 upgraded, 0 newly installed, 16 to remove and 12 not upgraded.
Which makes a lot more sense.

Ergo, be careful when you use autoremove -- sometimes it will kill your desktop. Keep an eye at what dist-upgrade does.

28 April 2012

125. Fixed: No internet on old Dell after debian testing upgrade

The situation:
I remotely dist-upgraded someone's old Dell laptop (Inspiron 6000). They were running Wheezy, but had not done a full apt-get upgrade/dist-upgrade since January. After a reboot, the laptop would not connect to the internet via either the wired or wireless interfaces.

ip addr and ifconfig showed three ifs:
lo
eth0
eth1

NOTE: A simple reason why you don't have wireless is because you'll need firmware-iwlwifi -- make sure you've enabled non-free and contrib in your repos.

The solution:
Adding
auto eth0
iface eth0 inet dhcp

to /etc/network/interfaces and commenting out
allow-hotplug eth0

followed by executing
sudo service networking restart && sudo service network-manager restart

brought up the wired interface, allowing for installation of packages and remote help. These instructions are simple enough for most to follow and can get you back in the driver's seat.

Next, I installed the wicd packages (wicd-curses, wicd-cli etc.)
sudo apt-get install wicd-cli wicd-curses wicd-daemon python-wicd

 -- at this point about 70 other packages got pulled in. Suspicious. I had seen that apt wanted me to autoremove a lengthy list of programs:

The following packages were automatically installed and are no longer required:  python-crypto mono-2.0-gac python-tagpy libgnomekbd4 seahorse-daemon libboost-python1.46.1 python-pyasn1 libswscale0 libjs-jquery-ui python-twisted-core ekiga python-opengl rpm2cpio xsltproc pnm2ppa libavutil50 gnuchess-book  gnome-nettool gnome-games-extra-data gnome-desktop-data libgnomepanel2.24-cil aisleriot gtali libglade2.0-cil libsushi-1.0-0 python-mako glchess libbabl-0.0-0 gir1.2-javascriptcoregtk-3.0 libgegl-0.0-0 ttf-sil-gentium libicu44  libraw2 libx264-116 libx264-118 tcptraceroute gir1.2-sushi-1.0 gnome-video-effects libcamel-1.2-23 python-clientform gnome-games gnome-session-canberra gdebi anthy-common anthy quadrapassel python-twisted-web libedataserverui1.2-11  update-manager-core gnobots2 libgnome-media0 libqtmultimediakit1 gnome-cards-data liferea-data libgraphite3 libmagickcore4-extra libglew1.6 rhythmbox bsh-gcj python-gdata gedit libnm-util1 xdg-user-dirs-gtk libgexiv2-0  python-gtksourceview2 gnome-office update-manager-gnome libwebkit-1.0-2 python-gtkglext1 xulrunner-5.0 libart2.0-cil libboost-program-options1.46.1 libminiupnpc5 libcamel1.2-19 librpmio2 update-notifier-common libpostproc51 librpm2  seahorse rpm-common libgnome2-perl libaccess-bridge-java-jni xulrunner-8.0 xulrunner-9.0 libnotify1 libaccess-bridge-java update-notifier python-mechanize libwebp0 libgnome2.24-cil libndesk-dbus1.0-cil gnome-media-common libgpod4  gnibbles libavformat52 rhythmbox-data libmono-cairo2.0-cil gedit-plugins libgrilo-0.1-0 zeitgeist-core system-tools-backends libboost-thread1.46.1 libgweather1 libgnome-bluetooth7 dasher python-configobj guile-1.8-libs shotwell  libpolkit-gtk-1-0 libdmapsharing-3.0-2 python-serial gedit-common libboost-serialization1.46.1 libboost-date-time1.46.1 libgmime2.4-cil python-gnomedesktop software-center libopal3.6.8 python-pam python-openssl libhwloc3  libmono-i18n-west2.0-cil libgssdp-1.0-2 simple-scan gir1.2-webkit-3.0 libebook1.2-10 libqtlocation1 python-markupsafe libgck0 python-webkit libmono-posix2.0-cil bsh libedataserverui-3.0-0 rhythmbox-plugin-cdrecorder libgdata11  libhunspell-1.2-0 librhythmbox-core4 librhythmbox-core5 libgtksourceview2.0-common libmono-security2.0-cil libgtksourceview2.0-0 libgnome2-vfs-perl gnotski dasher-data libegroupwise1.2-13 libvpx0 libedata-cal-1.2-11 libnm-glib2  gnome-doc-utils libecal1.2-8 python-twisted-conch libgmime-2.4-2 python-louie libunique-1.0-0 libedataserver1.2-14 libpython2.6 libimobiledevice1 libedata-book-1.2-9 python-nevow gnome-games-data iagno glines media-player-info  python-pysqlite2 libcupsdriver1 python-gnomeapplet libclutter-gtk-0.10-0 gnome-sudoku libslab0a libmagickcore4 tcl gir1.2-gucharmap-2.90 libmono-sharpzip2.84-cil libmagick++4 libmono-corlib2.0-cil python-epsilon  libgnome-window-settings1 libgpod-common rhythmbox-plugins libv8-3.5.10.24 libv8-3.6.6.14 libcryptui0a ntfsprogs python-axiom libmozjs2d libquvi0 python-bugbuddy libmozjs5d gir1.2-rb-3.0 libtracker-client-0.10-0 liferea libpt2.6.7  libmozjs8d libmozjs9d python-coherence libmagickwand4 libchamplain-0.8-1 libgupnp-1.0-3 python-gdbm libchamplain-gtk-0.8-1 gnotravex gnome-netstatus-applet libnl1 libnl3 gnect libavcodec52 python-evolution libanthy0 libyajl1  liboobs-1-4 libgucharmap7 liboobs-1-5 mahjongg libndesk-dbus-glib1.0-cil libid3tag0 libraptor1 gnome-system-tools python-wnck libtracker-sparql-0.10-0 libgnome-desktop-2-17 libtracker-sparql-0.12-0 hamster-applet gnuchess libfreerdp0  libgnome-vfs2.0-cil min12xxw libwebkit-1.0-common minissdpd transmission-common libgtkglext1 libnatpmp1 libnet1 python-twisted-bin libmatroska4 libgupnp-igd-1.0-3 libmono-system2.0-cil libgnome2-canvas-perl file-roller  libxalan2-java-gcj transmission-gtk python-rdflib sound-juicer gnomine

 and suddenly it made sense:

aptitude search gnome-core

pB  gnome-core                                                                                                     - The GNOME Desktop Environment -- essential components


Basically, it seems that gnome got 'uninstalled' (technically just the meta package) -- most of the files related to it won't get removed until you do apt-get autoremove, but it's crippled enough to reduce functionality.
At least that was my thesis.

sudo service network-manager stop
sudo wicd-curses eth1

showed no wireless networks. Something not right.

Make sure the system is really up to date, then reboot, and have another go at it:
sudo apt-get update && sudo apt-get upgrade
which pulled in some glib-networking-* packages.
sudo apt-get install gnome gnome-core
sudo shutdown -r now

After boot
sudo service network-manager stop
sudo wicd-curses eth1

et voilá -- I do get a list over the local wireless networks. There's still a worrying list over stuff when you look at what would be autoremoved (e.g. apt-get -s autoremove)

Rebooted and the wireless interface seems to be handled ok by network-manager.
There is still a number of packages marked for autoremove, so...
sudo apt-get autoremove

System seems to work ok still.
sudo apt-get install update-manager-gnome update-notifier


And my job is done.

Here's the final /etc/network/interfaces:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth1
#NetworkManager#iface eth0 inet dhcp
#allow-hotplug eth1
auto eth1
#iface eth1 inet dhcp
auto eth0
iface eth0 inet dhcp