Izumi Tsutsui | 4 Apr 15:47 2011
Picon

Re: pkgsrc build error for g95

> Well, just to try to see if it works, I set this in /etc/mk.conf:
> 
>  # cat /etc/mk.conf
> CFLAGS+= -march=mips3 -mabi=32

I'm not sure if pkgsrc system handles CFLAGS in mk.conf for packages build,
but we can edit Makefile after "make configure" in the package dir..

---
Izumi Tsutsui

Andy Ruhl | 5 Apr 17:21 2011
Picon

Re: pkgsrc build error for g95

On Mon, Apr 4, 2011 at 6:47 AM, Izumi Tsutsui <tsutsui <at> ceres.dti.ne.jp> wrote:
>> Well, just to try to see if it works, I set this in /etc/mk.conf:
>>
>>  # cat /etc/mk.conf
>> CFLAGS+= -march=mips3 -mabi=32
>
> I'm not sure if pkgsrc system handles CFLAGS in mk.conf for packages build,
> but we can edit Makefile after "make configure" in the package dir..

Well, I think I already knew this, but the g95 Makefile already has
the correct CFLAGS in it:

(from /usr/pkgsrc/lang/g95/work/g95-0.92/Makefile)

CFLAGS = -O2 -march=mips3 -mabi=32 -DIN_GCC -Wall -Wmissing-prototypes

But the failure is with this other software inside the g95 source dir:

gcc -DHAVE_CONFIG_H -I.     -D_FILE_OFFSET_BITS=64 -DHAVE_REAL_10=0 -fPIC -g -O2
 -MT mutex.o -MD -MP -MF .deps/mutex.Tpo -c -o mutex.o `test -f 'runtime/mutex.c
' || echo './'`runtime/mutex.c
/var/tmp//ccf6fbaP.s: Assembler messages:
/var/tmp//ccf6fbaP.s:30: Error: opcode not supported on this processor: mips1 (m
ips1) `ll $5,0($4)'
/var/tmp//ccf6fbaP.s:32: Error: opcode not supported on this processor: mips1 (m
ips1) `sc $6,0($4)'
gmake[1]: *** [mutex.o] Error 1
gmake[1]: Leaving directory `/usr/pkgsrc/lang/g95/work/g95-0.92/libf95.a-0.92'
gmake: *** [all] Error 2
*** Error code 2
(Continue reading)

Izumi Tsutsui | 5 Apr 18:22 2011
Picon

Re: pkgsrc build error for g95

> But the failure is with this other software inside the g95 source dir:
 :
> When I do "make configure" for g95, it apparently does not build a
> Makefile for libf95:

Hmm, configure looks called during "make", not make configure.

Anyway, work.i386/g95-0.92/libf95.a-0.92/runtime/mutex.c
seems simple enough. How about the attached change?

---
Izumi Tsutsui

--- work/g95-0.92/libf95.a-0.92/runtime/mutex.c.orig	2008-09-17 03:45:13.000000000 +0000
+++ work/g95-0.92/libf95.a-0.92/runtime/mutex.c
 <at>  <at>  -8,6 +8,11  <at>  <at> 

 #include <stdlib.h>

+#ifdef __NetBSD__	/* XXX: available only 5.0 and later */
+#include <sys/atomic.h>
+#define cas(ptr, old, new)	atomic_cas_uint(ptr, old, new)
+
+#else

 /* x86/x86_64 */

 <at>  <at>  -158,6 +163,7  <at>  <at> 

 #endif
(Continue reading)

Kieran Jacobsen | 6 Apr 00:50 2011
Picon

RE: /build.sh error

Just thought I should let you all know, I removed all files in DESTDIR, reran build.sh and everything worked.

-----Original Message-----
From: Izumi Tsutsui [mailto:tsutsui <at> ceres.dti.ne.jp]
Sent: Wednesday, 16 March 2011 11:41 PM
To: Kieran Jacobsen
Cc: port-mips <at> NetBSD.org; tsutsui <at> ceres.dti.ne.jp
Subject: Re: /build.sh error

> It is interesting that yes there are more files, I suspect it's the
> same from last + extras.
> Perhaps I didn't clean up enough after the failed build based off CVS?

It's better to remove all files under DESTDIR before build, and also all files under /usr/src before
extracting new sets.
---
Izumi Tsutsui

Andy Ruhl | 6 Apr 02:15 2011
Picon

Re: pkgsrc build error for g95

On Tue, Apr 5, 2011 at 9:22 AM, Izumi Tsutsui <tsutsui <at> ceres.dti.ne.jp> wrote:
>> But the failure is with this other software inside the g95 source dir:
>  :
>> When I do "make configure" for g95, it apparently does not build a
>> Makefile for libf95:
>
> Hmm, configure looks called during "make", not make configure.
>
> Anyway, work.i386/g95-0.92/libf95.a-0.92/runtime/mutex.c
> seems simple enough. How about the attached change?

When you sent this email, I already had a build in progress where I did this:

export CFLAGS="-march=mips3 -mabi=32"
(actually I think I copied the CFLAGS from the Makefile for g95 which
"make configure" created, but I don't have it right now)

And this worked. I have a g95 package now.

So after this I did make clean clean-depends, then make extract, and
applied your patch. I also removed the above CFLAGS from my
/etc/mk.conf file. Then I did make package and it failed. I have
attached a typescript file. The failure is different this time, this
is the last part:

../../libcpp/charset.c:1434: error: expected '=', ',', ';', 'asm' or '__attribut
e__' before '*' token
gmake[1]: *** [charset.o] Error 1
gmake[1]: Leaving directory `/usr/pkgsrc/lang/g95/work/gcc-4.0.3/g95/libcpp'
gmake: *** [all-libcpp] Error 2
(Continue reading)

Izumi Tsutsui | 6 Apr 13:49 2011
Picon

Re: pkgsrc build error for g95

> So after this I did make clean clean-depends, then make extract, and
> applied your patch. I also removed the above CFLAGS from my
> /etc/mk.conf file. Then I did make package and it failed. I have
> attached a typescript file. The failure is different this time, this
> is the last part:

It looks you might have some leftover CFLAGS settings:
>> checking whether the C compiler (gcc -O2 -march=mips3 -mabi=32 \
>> -DIN_GCC -Wall -Wmissing-prototypes ) works... yes

Clean all files and environments?
---
Izumi Tsutsui

Andy Ruhl | 7 Apr 15:17 2011
Picon

Re: pkgsrc build error for g95

On Wed, Apr 6, 2011 at 4:49 AM, Izumi Tsutsui <tsutsui <at> ceres.dti.ne.jp> wrote:
>> So after this I did make clean clean-depends, then make extract, and
>> applied your patch. I also removed the above CFLAGS from my
>> /etc/mk.conf file. Then I did make package and it failed. I have
>> attached a typescript file. The failure is different this time, this
>> is the last part:
>
> It looks you might have some leftover CFLAGS settings:
>>> checking whether the C compiler (gcc -O2 -march=mips3 -mabi=32 \
>>> -DIN_GCC -Wall -Wmissing-prototypes ) works... yes
>
> Clean all files and environments?

You were correct.

I removed the mips CFLAGS options from /etc/mk.conf, and also logged
out and back in to clear my environment variables. Then I did this:

root <at> taz:/usr/pkgsrc/lang/g95 # make extract && patch < patch && make package

This finished with success:

===> Building binary package for g95-0.92
=> Creating binary package /usr/pkgsrc/packages/All/g95-0.92.tgz

Thanks again Izumi.

Maybe we should submit this patch as a fix to the PR? I could try to
tell the person that maintains the libf95 package as well.

(Continue reading)

Izumi Tsutsui | 7 Apr 15:49 2011
Picon

Re: pkgsrc build error for g95

> Maybe we should submit this patch as a fix to the PR? I could try to
> tell the person that maintains the libf95 package as well.

As noted in the diff, "#ifdef __NetBSD__" check won't work on NetBSD 4.x.

Probably atomic_ops(3) check should be in configure like pulseaudio?

---
Izumi Tsutsui

D&B | 9 Apr 06:28 2011
Picon

Bastano 20 minuti!

Sbiancante per denti rapido!
Vuoi denti bianchi senza dover andare dal dentista?

Clicca qui per descrizione dettagliata; http://dentibianchi.visit-page.com

Sbiancante per denti istantaneo e' un marchio registrato ProWhite.

dott.ssa Daria Abbate
D&B srl
Via Larga 31
20125 Milano
Tel: +39 02 70032195


Gmane