[Hugs] #52: [PATCHES] port hugs98-Sep2006 to AIX 4.3.3, AIX 5.2, HPUX 11.0, SUNOS 5.9
#52: [PATCHES] port hugs98-Sep2006 to AIX 4.3.3, AIX 5.2, HPUX 11.0, SUNOS 5.9 -------------------------+-------------------------------------------------- Reporter: guest | Owner: nobody Type: enhancement | Status: new Priority: major | Milestone: Component: hugs | Version: 200609 Keywords: port | -------------------------+-------------------------------------------------- Sorry if this is a duplicate. I sent it to hugs-bugs@haskell.org but it just seems to have disappeared into the ether. Here is a shell script that I used to build the Sep 2006 release for: AIX 4.3.3 (IBM 5.0.2.0 compiler) AIX 5.2 (IBM 6.0.0.7 compiler) HPUX 11.0 (A.11.00.13 compiler) Redhat 9 x86 Redhat AS 4 x86 (CentOS actually) Solaris 9 (6.0u2 compiler) There are some source patches in the script as well as some settings that are required for proper compilation. I have a framework that runs the script in the unpacked source tree to do the build and install. Some autoconf work needs to be done for proper configuration of inline functions and shared library creation. As far as the latter goes you might consider using libtool, which is designed for that sort of thing. The current approach of using the compiler for shared library creation is not supported by HPUX 11.0 -- the link needs to be done by the linker directly. So at the very least the compiles and links need to be split into two separate commands. Some documentation for the OPTFLAGS and PTHREAD_CC variables would be nice. There is still an issue in the SUNOS build related to a couple of symbols in System/Posix/Internals.so. Hugs runs properly for what I am doing so I haven't spent time on this yet: runhugs: Error occurred ERROR "libraries/bootlib/System/Posix/Internals.hs" - Error while importing DLL "libraries/bootlib/System/Posix/Internals.so": ld.so.1: ffihugs: fatal: relocation error: file libraries/bootlib/System/Posix/Internals.so: symbol __hscore_readdir: referenced symbol not found There is also a question about the make_bootlib script -- what is "cat -s" intended to do? It is not clear to me that it is portable -- the AIX man page states that -S does what -s used to do, for example. Here is a summary of what I had to do for the various platforms to get hugs to compile and install: - AIX The AIX preprocessor fails when it sees invalid # directives. (Note that it also allows # directives to have white space or comments before the # -- it looked like some of the Haskell code in Hugs thinks spaces will prevent interference from the preprocessor.) The proper inline keyword is __inline. The _LARGE_FILES symbol collides with _LARGE_FILES_API, which latter is turned on automatically when long long is enabled (in at least one failed compilation, anyway). The hugs code has // comments in it -- this is not valid for older C compilers. Increase -qmaxmem so optimization completes without warnings. Turn on alloca support. Use -G compiler option for proper shared library support. - HPUX Added +Z to generate position independent code for shared library use. Added +DAportable so the resulting binaries can run on older PARISC version processors. Pass -b option to linker when building shared libraries. Added wrapper around ld for proper shared library linking. HPUX 11, at least the version I have, does not support linking a shared library via the compiler -- you are supposed to use the linker directly. I made a wrapper that throws away the crt0.o argument that the compiler passes to the linker and that seems to fix the problem (that particular file is not used for dynamic links and is not position-independent anyway so will cause a link failure). The HPUX compiler I have does not appear to support the inline keyword. - LINUX no changes necessary - SUNOS The SUNOS compiler I have (6.0u2) has some sort of problem with inline functions as used by Hugs in shared libraries. I converted them to "static" to work around whatever was going on. Perhaps "extern inline" is needed or some such. Set the -G option for linking shared libraries. -- Joe Buehler jbuehler@spirentcom.com {{{ #!/bin/ksh HOST="$1" OS="$2" OS_VERSION="$3" OS_VERSION_MINOR="$4" patch_aix() { /usr/local/bin/patch -p0 -N -b -Vnumbered <<\EOF --- libraries/tools/make_bootlib.~1~ 2006-05-19 17:36:17.000000000 -0400 +++ libraries/tools/make_bootlib 2007-01-09 12:50:58.000000000 -0500 @@ -62,10 +62,19 @@ # portability we run the preprocessor on a .c file. cpp_input=$tmpdir/cppinput.c - cp "$1" $cpp_input + # AIX C/C++ compiler version 6.0 fails on illegal preprocessor directives + sed ' + s/^\([ ]*#[ ]*[-!]\)/ELIMINATE THIS STRING PLEASE\1/ + s/^\([ ][ ]*#[ ]*[A-Z]\)/ELIMINATE THIS STRING PLEASE\1/ + s/^\([ ][ ]*#[ ]*osthreads\)/ELIMINATE THIS STRING PLEASE\1/ + ' "$1" >$cpp_input # gcc-3.3 on MacOS X 10.3 is reported to add #pragma - $cpp $cpp_flags $cpp_input | grep -v '^#' | cat -s + $cpp $cpp_flags $cpp_input | + sed ' + /^#/d + s/^ELIMINATE THIS STRING PLEASE// + ' | cat -s } # internal Hugs modules --- packages/base/include/HsBase.h.~1~ 2006-09-20 18:01:52.000000000 -0400 +++ packages/base/include/HsBase.h 2007-01-09 13:10:35.000000000 -0500 @@ -220,6 +220,8 @@ #ifndef INLINE # if defined(_MSC_VER) # define INLINE extern __inline +# elif defined(__xlC__) +# define INLINE __inline # elif defined(__GNUC__) # define INLINE extern inline # else EOF } patch_hpux() { /usr/local/bin/patch -p0 -N -b -Vnumbered <<\EOF --- packages/base/include/HsBase.h.~1~ 2006-09-20 18:01:52.000000000 -0400 +++ packages/base/include/HsBase.h 2007-01-09 13:10:35.000000000 -0500 @@ -220,6 +220,8 @@ #ifndef INLINE # if defined(_MSC_VER) # define INLINE extern __inline +# elif defined(__hpux) +# define INLINE static # elif defined(__GNUC__) # define INLINE extern inline # else EOF } patch_sunos() { /usr/local/bin/patch -p0 -N -b -Vnumbered <<\EOF --- packages/base/include/HsBase.h.~1~ 2006-09-20 18:01:52.000000000 -0400 +++ packages/base/include/HsBase.h 2007-01-09 13:10:35.000000000 -0500 @@ -220,6 +220,8 @@ #ifndef INLINE # if defined(_MSC_VER) # define INLINE extern __inline +# elif defined(__sun) +# define INLINE static # elif defined(__GNUC__) # define INLINE extern inline # else EOF } export CC=cc export PTHREAD_CC=cc export CFLAGS=-O export OPTFLAGS=-O case "$OS" in aix) # This is the compiler I like to use under AIX. CC=/usr/vacpp/bin/xlC_r PTHREAD_CC=/usr/vacpp/bin/xlC_r # Enable large files -- this is implied by "long long" so we turn it on globally. CFLAGS="$CFLAGS -D_LARGE_FILE_API" # Some of the C code actually has C++ commments in it! CFLAGS="$CFLAGS -qcpluscmt" # Increase memory available for optimization. CFLAGS="$CFLAGS -qmaxmem=32768" # For alloca support CFLAGS="$CFLAGS -ma" # This version of HUGS does not know how to make AIX shared objects. export ac_cv_dll_flags=-G # The _LARGE_FILES and _LARGE_FILE_API symbols are incompatible -- # defining both causes system header file conflicts (AIX 5.2.0.0) export ac_cv_sys_large_files=no patch_aix ;; hpux) # This version of HUGS does not know how to make HPUX shared objects. CFLAGS="$CFLAGS +Z +DAportable -tl,$PWD/myld" export ac_cv_dll_flags="-Wl,-b" cat >myld <<-\EOF && chmod 755 myld #!/bin/ksh I=0 J=0 SHARED= #echo "LINK: $0 $*" >&2 for ARG; do case "$ARG" in */crt0.o) ARGV[$I]="$ARG" I=$(expr $I + 1) ;; -b) SHARED=1 ARGV[$I]="$ARG" ARGV_SHARED[$J]="$ARG" I=$(expr $I + 1) J=$(expr $J + 1) ;; *) ARGV[$I]="$ARG" ARGV_SHARED[$J]="$ARG" I=$(expr $I + 1) J=$(expr $J + 1) ;; esac done if [ "$SHARED" != "" ]; then set -x ld "${ARGV_SHARED[@]}" else set -x ld "${ARGV[@]}" fi EOF patch_hpux ;; linux) ;; sunos) # This version of HUGS does not know how to make SUNOS shared objects. export ac_cv_dll_flags=-G patch_sunos ;; esac && ./configure \ CC="$CC" \ PTHREAD_CC="$CC" \ CFLAGS="$CFLAGS" \ OPTFLAGS="$OPTFLAGS" \ --disable-large-banner \ --with-pthreads \ && gmake && ( gmake verbosecheck || true ) && gmake install && true }}} -- Ticket URL: http://hackage.haskell.org/trac/hugs/ticket/52 Hugs http://www.haskell.org/hugs/ Hugs 98, an interpreter for Haskell
#52: [PATCHES] port hugs98-Sep2006 to AIX 4.3.3, AIX 5.2, HPUX 11.0, SUNOS 5.9 --------------------------+------------------------------------------------- Reporter: guest | Owner: nobody Type: enhancement | Status: new Priority: major | Milestone: Component: hugs | Version: 200609 Resolution: | Keywords: port --------------------------+------------------------------------------------- Comment (by edoll): [http://www.sj83.com/google.htm google左侧排名] [http://www.sj83.com/google.htm google排名] [http://www.global-jipiao.cn/feijipiao.htm 飞机票] [http://www.zzsszg.com/ 破碎机] [http://www.zzsszg.com/ 球磨机] [http://www.zzsszg.com/ 选矿设备] [http://www.zzsszg.com/ 雷蒙磨] [http://www.zzsszg.com/ 烘干机] [http://www.bjqmzx.com/ 整形] [http://www.bjqmzx.com/ 隆鼻] [http://www.bj-huaao.com/ 机票] [http://www.kenhua.com/ 打包机] [http://www.nuoyasoft.cn/ 短信群发] [http://www.noahsoft.cn/ 短信群发器] [http://www.nuoyasoft.cn/ 短信群发软件] [http://www.shujuhuifu.com.cn/index.htm 数据恢复] [http://www.edoll.cn/ google左侧排名] [http://www.edoll.cn/about.htm google左侧排名] [http://www.edoll.cn/ google排名] [http://www.edoll.cn/problems.htm google排名] [http://www.bound.com.cn/ 工控机] [http://www.global-jipiao.cn/ 机票] [http://www.hyibm.com/ IBM笔记本] [http://www.huagu.com/ 鲜花] [http://www.zzhero.com/dxcxj.htm 磁选机] [http://www.zzhero.com/gscxj.htm 浮选机] [http://www.zzhero.com/yzqmj.htm 球磨机] [http://www.zzhero.com/fjspxj.htm 破碎机] [http://www.hansl.com.cn/ 蟑螂] [http://www.veimei.com/ 床上用品] [http://www.zckc.cn/ 大屏幕] [http://www.bf201.com/ 减肥] [http://www.bf201.com/ 专业美容] [http://www.romaster.com.cn/ 西装] [http://www.romaster.com.cn/ 职业装] [http://www.romaster.com.cn/ 礼服] [http://www.hmitech.com/index.asp 平板电脑] [http://www.hmitech.com/ 嵌入式触摸屏] [http://www.hmitech.com/ 人机界面] [http://www.bhjj.net/ 家教] [http://www.bhjj.net/teacher/default.asp?st=1 北京家教] [http://www.wolaog.cn/ google排名] [http://www.wolaog.cn/ google左侧排名] [http://www.shibaili.cn/ 干洗机] [http://www.shibaili.cn/ 干洗] [http://www.shibaili.cn/ 干洗机价格] [http://www.shibaili.cn/ 干洗店加盟] [http://www.shibaili.cn/ 干洗设备] [http://www.shibaili.cn/ 干洗加盟] [http://www.bjqxqy.com/bjqxqy.htm 墙面粉刷] [http://www.bjqxqy.com/bjqxqy.htm 地毯清洗] [http://www.bjqxqy.com/bjqxqy.htm 石材翻新] [http://www.bjqxqy.com/bjqxqy.htm 清洗油烟机] [http://www.bjqxqy.com/bjqxqy.htm 木地板翻新] [http://googleseo.cn.35so.cn/ google左侧排名] [http://www.edoll.net.cn/ google左侧推广] [http://www.edoll.net.cn/ google左侧优化] [http://www.bjlxjy.com/ 集团电话] [http://www.nuoyasoft.cn/ 群发短信] [http://www.office-jiaju.com/ 北京办公家具] [http://www.bjhchd.com/ 真空泵] [http://www.ydel.com/ 玩具] [http://www.jiuzhou.net.cn/ 模型] [http://www.ekey.com.cn/ 无线网桥] [http://www.piebridge.net/ 亚洲交友中心] [http://blog.zol.com.cn/pkgoogle/ google左侧排名] [http://blog.hc360.com/portal/personShowArticle.do?articleId=110403 google左侧排名] [http://www.csfish.cn/ google排名] [http://www.csfish.cn/ google左侧排名] [http://www.highontop.com/ 防雷] [http://www.cccstandard.com/ 废料] [http://www.cccstandard.com/ 玩具认证] [http://www.baida.org/xianhua/ 鲜花] [http://www.bjlttj.cn/ 监控] [http://www.bjlttj.cn/ 综合布线] [http://www.bjlttj.cn/ 系统集成] [http://www.baida.org/jiajiao/ 北京家教] [http://www.wyzql.cn/firefox/ firefox 2.0] [http://www.wyzql.cn/firefox/ firefox] [http://www.wyzql.cn/firefox/ firefox下载] [http://www.52crystal.cn/ 个人网站] [http://www.baida.org/tuiguang.html 网站推广] [http://www.baida.org/gyuahua.html google优化] [http://www.baida.org/youhua.html 搜索引擎优化] [http://www.zzhero.com/ 浮选机] [http://www.zzhero.com/ 磁选机] [http://googlerank.cn.35so.cn/ google左侧排名] [http://hi.baidu.com/googlepk google左侧排名] [http://www.jingeyuqi.com.cn/zhaopin.asp 广告公司] [http://www.jingeyuqi.com.cn/index.asp 文化传播有限公司] [http://www.jingeyuqi.com.cn/index.asp 婚庆公司] [http://www.jingeyuqi.com.cn/intro.asp 北京婚庆公司] [http://www.jingeyuqi.com.cn/yewu.asp 礼仪庆典公司] [http://www.jingeyuqi.com.cn/yanchu.asp 北京演出公司] [http://www.jingeyuqi.com.cn/yanchu.asp 演出公司] [http://www.jingeyuqi.com.cn/product.asp 公关公司] [http://www.njjghg.com/user/jghg/index_cn.asp 偶联剂] [http://www.bound.com.cn/ 凌华工控机] [http://www.baida.org/ google排名] [http://www.baida.org/kno_1.html google排名] [http://www.baida.org/google.html google左侧排名] [http://www.baida.org/kno_3.html google左侧排名] -- Ticket URL: http://hackage.haskell.org/trac/hugs/ticket/52 Hugs http://www.haskell.org/hugs/ Hugs 98, an interpreter for Haskell
participants (1)
-
Hugs