Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jan 2008 07:57:45 GMT
From:      Paulius <paulius.stakauskas@agservice.lt>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/120180: FlatAssembler (fasm) update
Message-ID:  <200801310757.m0V7vjEV033533@www.freebsd.org>
Resent-Message-ID: <200801310800.m0V808m9048333@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         120180
>Category:       ports
>Synopsis:       FlatAssembler (fasm) update
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 31 08:00:08 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Paulius
>Release:        FreeBSD 6.3-RELEASE
>Organization:
>Environment:
FreeBSD qigong 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 16 09:36:52 EEST 2008     root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386 
>Description:
I have installed /usr/ports/lang/fasm the latest version on ports is 1.67.23 and is nearly one year old. I have updated the port to the newest version 1.67.26 which was released on January 27, 2008. The old version was not the only problem, the second problem was that I have tested on various machines 1.63.23 version and while trying to run fasm, all were giving the same output of:
---
(gdb) file /usr/local/bin/fasm
Reading symbols from /usr/local/bin/fasm...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/local/bin/fasm
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x2812e630 in fputc () from /lib/libc.so.6
(gdb) backtrace
#0  0x2812e630 in fputc () from /lib/libc.so.6
#1  0x08048b20 in ?? ()
#2  0x00000066 in ?? ()
#3  0x00000001 in ?? ()
#4  0x08048b0e in ?? ()
#5  0x0804875f in ?? ()
#6  0xbfbfece0 in ?? ()
#7  0x08048676 in ?? ()
#8  0x00000001 in ?? ()
#9  0xbfbfece8 in ?? ()
#10 0xbfbfecf0 in ?? ()
#11 0x00000010 in ?? ()
#12 0x08059db8 in ?? ()
#13 0x00000000 in ?? ()
#14 0x00000000 in ?? ()
#15 0x2805eb0e in .rtld_start () from /libexec/ld-elf.so.1
#16 0xbfbfece4 in ?? ()
#17 0xbfbfecd0 in ?? ()
#18 0xbfbfecd4 in ?? ()
#19 0x00000000 in ?? ()
#20 0x2805f9c8 in elf_hash () from /libexec/ld-elf.so.1
#21 0x00000001 in ?? ()
(gdb) q
---

The updated version works fine.

PS: before reporting problem I have written to the current maintainer(skv@protey.ru), but I didn't got any reply from him. I want to become maintainer of this port.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN fasm.bak/Makefile fasm/Makefile
--- fasm.bak/Makefile	2007-09-23 15:09:30.000000000 +0300
+++ fasm/Makefile	2008-01-30 16:57:41.000000000 +0200
@@ -1,16 +1,16 @@
 # New ports collection makefile for:	fasm
-# Date created:	   22 February 2007
-# Whom:		   Sergey Skvortsov <skv@protey.ru>
+# Date created:	   30 January 2008
+# Whom:		   Paulius Stakauskas <paulius.stakauskas@punktas.lt>
 #
-# $FreeBSD: ports/lang/fasm/Makefile,v 1.2 2007/09/23 12:09:30 skv Exp $
+# $FreeBSD: ports/lang/fasm/Makefile,v 1.3 2008/01/30 16:57:21 stakys Exp $
 #
 
 PORTNAME=	fasm
-PORTVERSION=	1.67.23
+PORTVERSION=	1.67.26
 CATEGORIES=	lang devel
 MASTER_SITES=	http://flatassembler.net/
 
-MAINTAINER=	skv@FreeBSD.org
+MAINTAINER=	paulius.stakauskas@punktas.lt
 COMMENT=	Flat, multiple-pass assembler for IA-32 & x86-64 architectures
 
 ONLY_FOR_ARCHS=	i386 amd64 ia64
@@ -28,14 +28,20 @@
 .endif
 
 do-build:
-	cd ${WRKSRC} && ${CC} ${CFLAGS} fasm.o -o fasm
-
+	(cd ${WRKSRC} && ${CC} ${CFLAGS} fasm.o -o fasm)
+	@ ${BRANDELF} -t Linux ${WRKSRC}/examples/elfexe/hello
+	@ ${BRANDELF} -t Linux ${WRKSRC}/examples/elfexe64/hello64
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/fasm ${PREFIX}/bin
-.ifndef(NOPORTDOCS)
+.if !defined(NOPORTDOCS)
 	@${ECHO_MSG} "===>   Installing documentation for ${PKGNAME}"
-	@${MKDIR} ${DOCSDIR}
+	@${MKDIR} ${DOCSDIR} 
 	${INSTALL_DATA} ${WRKSRC}/*.txt ${DOCSDIR}
 .endif
+.if !defined(NOPORTEXAPMLES)
+	@${ECHO_MSG} "===>   Installing examples for ${PKGNAME}"
+	@${MKDIR} ${EXAMPLESDIR}
+	(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${EXAMPLESDIR} && chmod -R 755 ${EXAMPLESDIR})
+.endif
 
 .include <bsd.port.post.mk>
diff -ruN fasm.bak/distinfo fasm/distinfo
--- fasm.bak/distinfo	2007-09-23 15:09:30.000000000 +0300
+++ fasm/distinfo	2008-01-30 13:35:16.000000000 +0200
@@ -1,3 +1,3 @@
-MD5 (fasm-1.67.23.tar.gz) = 09ecc6a15a7e60bc943548f428e3e925
-SHA256 (fasm-1.67.23.tar.gz) = 841c4e0ecf38195c2b5bb9b65cbfb4d34e48343391d1af732c836d3802a1b66d
-SIZE (fasm-1.67.23.tar.gz) = 183203
+MD5 (fasm-1.67.26.tar.gz) = 17fd2953b0083199a6d6d974c55f06c7
+SHA256 (fasm-1.67.26.tar.gz) = 4cffeb7e3df3b3c61353387dac9c5f5b2e3705df15ddccab3e54e5033e9cbfb0
+SIZE (fasm-1.67.26.tar.gz) = 190710
diff -ruN fasm.bak/pkg-plist fasm/pkg-plist
--- fasm.bak/pkg-plist	2007-02-22 13:15:01.000000000 +0200
+++ fasm/pkg-plist	2008-01-30 15:53:44.000000000 +0200
@@ -3,4 +3,19 @@
 %%PORTDOCS%%%%DOCSDIR%%/license.txt
 %%PORTDOCS%%%%DOCSDIR%%/readme.txt
 %%PORTDOCS%%%%DOCSDIR%%/whatsnew.txt
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/elfexe/hello.asm
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/elfexe/hello
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/elfexe64/hello64.asm
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/elfexe64/hello64
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/elfobj/msgdemo.asm
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/elfobj/msgdemo.o
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/elfobj/writemsg.asm
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/elfobj/writemsg.o
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/libcdemo/cdecl.inc
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/libcdemo/libcdemo.o
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/libcdemo/libcdemo.asm
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/libcdemo
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/elfobj
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/elfexe64
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/elfexe
 %%PORTDOCS%%@dirrm %%DOCSDIR%%


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801310757.m0V7vjEV033533>