Posts tagged ‘programming’

If you need a MySQL installation compiled in “32bit mode”, you’ll not be able to achieve your goal with MacPorts:

root@ramses:/opt # port install mysql5-devel
--->  Computing dependencies for mysql5-devel
--->  Fetching mysql5-devel
--->  Attempting to fetch mysql-5.1.39.tar.gz from http://ftp.plusline.de/mysql/Downloads/MySQL-5.1/
--->  Verifying checksum(s) for mysql5-devel
--->  Extracting mysql5-devel
--->  Applying patches to mysql5-devel
--->  Configuring mysql5-devel
--->  Building mysql5-devel
Error: Target org.macports.build returned: shell command "
cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_mysql5-devel/work/mysql-5.1.39" &&
 /usr/bin/make -j2 all " returned error 2
Command output:       _rl_library_version$non_lazy_ptr in mysql.o
  "_write_history", referenced from:
      _mysql_end in mysql.o
  "_add_history", referenced from:
      fix_history(String*)      in mysql.o
      read_and_execute(bool)  in mysql.o
      read_and_execute(bool)  in mysql.o
  "_history_length", referenced from:
      _history_length$non_lazy_ptr in mysql.o
  "_rl_readline_name", referenced from:
      _rl_readline_name$non_lazy_ptr in mysql.o
  "_rl_add_defun", referenced from:
      _main in mysql.o
  "_rl_attempted_completion_function", referenced from:
      _rl_attempted_completion_function$non_lazy_ptr in mysql.o
  "_rl_insert", referenced from:
      fake_magic_space(int, int)in mysql.o
  "_history_get", referenced from:
      not_in_history(char const*)in mysql.o
  "_readline", referenced from:
      read_and_execute(bool)  in mysql.o
  "_read_history", referenced from:
      _main in mysql.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [mysql] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f .deps/mysqltest-mysqltest.Tpo .deps/mysqltest-mysqltest.Po
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

Error: Status 1 encountered during processing.

The same happens with the port mysql5. You can switch to 32bit by setting build_arch to i386 in the file /opt/local/etc/macports/macports.conf.
So I’ll try to use a precompiled package and hope it’ll work with my development environment.

If you want to remove the dotted border of a focussed html element, you can do this with the following CSS definition:

outline-style: none

You might consider usability problems and accessibility before doing that. I’ll use it for a star rating tool.

If you want to get every line from a file containing foo OR !bar:

(grep foo file.txt; grep -v bar file.txt) | sort -u

“sort” is necessary to filter duplicate generated entries. Alternatively you could also use perl -ne. Hint from Urban.