Skip to content

building MPlayer-1.0rc4 on openbsd 5.0

首先,建议使用openbsd 的package安装,而不是从源码编译,除非里面的mplayer确实不适用。 source file: http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2   编译之前,先下载: http://www2.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2 然后解压至/usr/local/lib/codecs文件夹 configure选项: –codecsdir=/usr/local/lib/codecs –extra-cflags=-I/usr/local/include –extra-ldflags=-L/usr/local/lib gmake && gmake install  #(gmake, not make)   如果出现: network.h:69: error: redefinition of ‘struct sockaddr_storage’ 编辑 libavformat/network.h文件,在文件前面添加: #define HAVE_STRUCT_SOCKADDR_STORAGE 1   在AMD64平台上,你可能会遇到下面的错误: {standard input}: Assembler messages: {standard input}:18: Error:…

Read more

build php-5.3.8 on OpenBSD 5.0

由于要配合nginx使用php-fpm,于是自己编译php-5.3.8。 在make的时候出现如下错误: ext/iconv/iconv.c:615: undefined reference to `iconv’ google了一下,说是在make的时候要加上参数 EXTRA_CFLAGS=-liconv,或者是修改Makefile,但是依然不行。 最后,删除config.cache, 运行make clean,加上“–with-iconv=/usr/local”参数重新configure,然后make &&  make install 成功。 configure参数如下,仅供参考: ./configure’ ‘–enable-fpm’ ‘–with-fpm-user=_nginx’ ‘–with-fpm-group=_nginx’ \ ‘–enable-mbstring’ ‘–with-mysqli’ ‘–with-mysql’ ‘–with-pdo-mysql’ ‘–with–openssl’ \ ‘–with-curl’ ‘–with-xsl’ ‘–enable-mbstring’ ‘–with-zlib’ ‘–with-bz2’ ‘–with-mhash’ \ ‘–with-mcrypt’ ‘–with-iconv=/usr/local’ 2011/11/29 更新:目前已经有php-fpm软件包,无需自己编译了。

Read more

install flvtool2 on OpenBSD 5.0

cd /usr/src/ pkg_add -v ruby-1.8 ftp http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz tar xzf flvtool2-1.0.6.tgz cd flvtool2-1.0.6 ruby setup.rb config ruby setup.rb setup ruby setup.rb install cd ..

Read more

compile qt-faststart on openbsd 5.0

  git clone git://git.videolan.org/ffmpeg.git  cd ffmpeg  ./configure –enable-gpl –enable-version3 –enable-nonfree –enable-postproc \ –enable-libfaac –enable-libmp3lame –enable-libopencore-amrnb \ –enable-libopencore-amrwb –enable-libtheora –enable-libvorbis \ –enable-libvpx –enable-libx264 –enable-libxvid –enable-x11grab (上面的参数需要预先安装相应的codec/Library。或者直接运行./configure)  make make tools/qt-faststart cp -a tools/qt-faststart /usr/local/bin/

Read more

Provide an AUTOMAKE_VERSION environment variable

在OpenBSD 5.0-current上编译libfaac的时候出现如下问题 [root@cactus /usr/src/faac-1.28]# ./bootstrap Provide an AUTOMAKE_VERSION environment variable, please Provide an AUTOCONF_VERSION environment variable, please Provide an AUTOMAKE_VERSION environment variable, please Provide an AUTOCONF_VERSION environment variable, please   检查一下automake和autoconf的版本: [root@cactus /usr/src/faac-1.28]# pkg_info | grep auto autoconf-2.59p3     automatically configure…

Read more

read CAT source file

我学习cat命令的源码及注释。 /*    $OpenBSD: cat.c,v 1.20 2009/10/27 23:59:19 deraadt Exp $    */ /*    $NetBSD: cat.c,v 1.11 1995/09/07 06:12:54 jtc Exp $    */ /* * Copyright (c) 1989, 1993 *    The Regents of the University of California.  All rights reserved. * *…

Read more

mbr.S

更新: 还有一个更正的注释版本,里面有流程图,不适合这里展示。放在网盘上供大家下载: https://pan.baidu.com/s/1jGQGifs /* copy right info removed due to display issues – Nov. 2011 */ .file “mbr.S” #include #include /* * Memory layout: * * 0x07C00 -> 0x07DFF BIOS loads us here (at 31k) * 0x07E00 -> 0x17BFC our…

Read more

Undelivered – 5.1.0 Address rejected

最近在做一个<a href=”http://zh.wikipedia.org/wiki/DKIM”>DKIM</a>相关的项目。有用户的邮件无法接收。OUTLOOK返回如下错误信息: This message was created automatically by the mail system. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: >>> [email protected] (Undelivered): 550…

Read more

php_network_getaddresses errors on OpenBSD

如果你使用OpenBSD来为你的Wordpress或drupal的CMS提供主机服务,你很可能会碰到类似下面的错误消息: Uh-oh, we were unable to verify your API Key. Please check them and try again! The server said:Could not connect (ERR 0: php_network_getaddresses: getaddrinfo failed: non-recoverable failure in name resolution) 我的OpenBSD服务器名称解析很正常,为什么还会报这个错误呢? 这是因为OpenBSD上的Apache默认是chroot到/var/www目录下的,而PHP脚本在名称解析时需要用到/etc/resolv.conf文件中配置的名称服务器。在chroot的情况下,PHP程序看到的“/”目录其实是实际的/var/www目录。 因此解决这个问题就很简单了: mkdir /var/www/etc/ cp /etc/resolv.conf /var/www/etc/ apachectl…

Read more
Sidebar