Izumi Tsutsui | 16 Nov 2008 10:44
Picon
Gravatar

How to crossbuild on Cygwin

Hi,

The attached text is a simple memo "how to crossbuild on Cygwin"
which I wrote when I played it on Windows XP + Cygwin 1.5.25
to track some related PRs.

I'm not sure if we have proper place (on www or somewhere else)
to put such text, but any volunteers or comments for
test/improve/xml'fy etc. would be appreciated.

Thanks,

---

0. See Cygwin User'g Guide first:
 http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html
 http://cygwin.com/cygwin-ug-net/setup-net.html

1. Open http://cygwin.com/
 Click "Install or update now!"

2. Choose A Donwload Source:
 Select "Install from Internet" and "next"

3. Select Root Install Directory:
  "Root Directory"         -> Specify directory for Cygwin ("c:\cygwin" etc.)
  "Install for"            -> Select "All users" or "Just Me" as you like
  "Default Text File Type" -> Select "Unix / binary(RECOMMENDED)" as noted

4. Select Local Package Directory:
(Continue reading)

David Holland | 16 Nov 2008 21:06
Picon

Re: CVS commit: pkgsrc/x11/gtk

On Sun, Nov 16, 2008 at 03:09:18AM +0000, Chuck Cranor wrote:
 > > Please just fix the stupid configure tests to always use static for
 > > inline functions.
 > 
 > I'll try and look at it.   I didn't really understand what was going
 > on, but then I found this discussion on gcc inline and c99:
 >   http://gcc.gnu.org/ml/gcc/2006-11/msg00006.html
 > 
 > yuck, what a standards mess gcc got itself into.   The Apple version
 > of gcc with -std=c99 (or -std=gnu99) follows the c99 standard 
 > ("extern inline") generates a T text symbol, where as the netbsd gcc 
 > does not.   My reading of that message seems to indicate that 
 > netbsd gcc is doing the wrong thing according to the standard?

My understanding from reading comp.std.c is that the message is wrong.
I will look for C&V though, because my understanding is by no means
authoritative.

(Adding tech-toolchain for obvious reasons.)

--

-- 
David A. Holland
dholland <at> netbsd.org

Chuck Cranor | 17 Nov 2008 21:13
Picon
Favicon

Re: CVS commit: pkgsrc/x11/gtk

On Sun, Nov 16, 2008 at 08:06:01PM +0000, David Holland wrote:
>  > I'll try and look at it.   I didn't really understand what was going
>  > on, but then I found this discussion on gcc inline and c99:
>  >   http://gcc.gnu.org/ml/gcc/2006-11/msg00006.html

> My understanding from reading comp.std.c is that the message is wrong.
> I will look for C&V though, because my understanding is by no means
> authoritative.
> (Adding tech-toolchain for obvious reasons.)

OK, more debugging shows that the source of the problem is in the file 
/usr/pkg/include/glib/glib-1.2/glib.h from the glib package.   That
is causing the compile failure for x11/gtk.   

The critical bit is below (quoting from glib-1.2/glib.h).  Note that
when compiling:

 G_INLINE_FUNC is not initially defined (but gets defined in this file)
 G_CAN_INLINE gets defined to 1
 __GNUC__ is defined
 __STRICT_ANSI__ is NOT defined
 __OPTIMIZE__ is defined

so that basically results in this line getting run:

#      define G_INLINE_FUNC extern inline

and on Darwin if you do "extern inline" it generates a "T" symbol,
so if you put that in a .h file and include it more than once you are
going to get a duplicate symbol compile time error [e.g. on functions 
(Continue reading)

Joerg Sonnenberger | 17 Nov 2008 21:20
Picon

Re: CVS commit: pkgsrc/x11/gtk

On Mon, Nov 17, 2008 at 03:13:02PM -0500, Chuck Cranor wrote:
> We could modify the glib.h (via a pkgsrc patch file) to do "static inline"
> rather than "extern inline" when __GNUC__ and __OPTIMIZE__ are set?

Yes, I think that is preferable.

Joerg

Frank Wille | 19 Nov 2008 11:07
Picon

make cleandir fails in src/lib

Hi,

I have a problem with "make cleandir" since 4.99.x, caused by the
${MKLDAP} part in src/lib/Makefile:

.if (${MKLDAP} != "no")
                                 # depends on libcrypto - only if ${MKCRYPTO}
SUBDIR+=        ../external/bsd/openldap/lib
.endif

It leads to the following error message:

cleandir ===> lib
make: "/home/frank/netbsd/current/src/lib/Makefile" line 107: Unassociated 
shell command "# depends on libcrypto - only if ${MKCRYPTO}"
make: Fatal errors encountered -- cannot continue

This can easily be fixed by making the '#' start at the first column.
Should I fix that and commit, or is there someting I am missing?

--

-- 
Frank Wille

Bernd Ernesti | 19 Nov 2008 12:36
Picon

Re: make cleandir fails in src/lib

On Wed, Nov 19, 2008 at 11:07:45AM +0100, Frank Wille wrote:
> Hi,
> 
> I have a problem with "make cleandir" since 4.99.x, caused by the
> ${MKLDAP} part in src/lib/Makefile:
> 
> .if (${MKLDAP} != "no")
>                                 # depends on libcrypto - only if ${MKCRYPTO}
> SUBDIR+=        ../external/bsd/openldap/lib
> .endif
> 
> 
> It leads to the following error message:
> 
> cleandir ===> lib
> make: "/home/frank/netbsd/current/src/lib/Makefile" line 107: Unassociated 
> shell command "# depends on libcrypto - only if ${MKCRYPTO}"
> make: Fatal errors encountered -- cannot continue
> 
> 
> This can easily be fixed by making the '#' start at the first column.
> Should I fix that and commit, or is there someting I am missing?

Hmm, I don't have that problem, but the 4 tabs shouldn't be there.
Go for it and request a pullup for netbsd-5 too.

Bernd

Alexander Shishkin | 25 Nov 2008 10:19

arm eabi support

Good day,

Are there any plans to support/move to arm eabi any time soon?
From briefly going through the email exchanges on the topic, I see
that there was some intention to do so back in 2002, but the current
state of the toolchain hints that it'll at the very least take a
binutils upgrade (for that matter, a patchset has been proposed by
Mikko Rapeli [1]).

The other thing is changing the system call/c library interface
accordingly to enable this. So, the questions are:
 + has this been considered?
 + what other parts of NetBSD might require tweaking in order to
   enable EABI?

[1]: http://mail-index.netbsd.org/tech-toolchain/2008/10/01/msg000437.html

Thanks in advance,
--
Alex

Mikko Rapeli | 25 Nov 2008 12:48

rump_nfs dependencies and binutils 2.18.50

Hello,

I ran to this rump_nfs build problem when cross compiling current from last
Thursday to evbarm with binutils 2.18.50:

#      link  rump_nfs/rump_nfs
/home/mira/src/netbsd/netbsd-thumb/obj/tooldir.Linux-2.6.24-etchnhalf.1-686-unknown/bin/arm--netbsdelf-gcc
-B/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib/
-B/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib/
-Wl,-nostdlib   -Wl,--wrap=malloc  -Wl,--fatal-warnings     -o rump_nfs
getnfsargs.o mount_nfs.o rump_nfs.o pathadj.o fattr.o -lrumpfs_nfs
-lrumpnet -lrumpnet_sockin -lrumpfs_nfs -lp2k -lukfs -lrumpvfs -lrump
-lrumpuser -lpuffs -lutil -lpthread
-L/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib
-Wl,-rpath-link,/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/lib
-L/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/lib
-Wl,-rpath-link,/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib
-L/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib
/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib/librumpnet.so:
undefined reference to `__start_link_set_domains'
/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib/librumpnet.so:
undefined reference to `__stop_link_set_domains'
collect2: ld returned 1 exit status

This is fixed by linking with rumpnet_net too, but since I'm not seeing this
with plain current and its binutils 2.16.1, I'm not sure if it is really 
needed. 

diff --git a/usr.sbin/puffs/rump_nfs/Makefile b/usr.sbin/puffs/rump_nfs/Makefile
index dfc4b3f..d516530 100644
(Continue reading)

Antti Kantee | 25 Nov 2008 13:01
Picon
Picon

Re: rump_nfs dependencies and binutils 2.18.50

On Tue Nov 25 2008 at 13:48:39 +0200, Mikko Rapeli wrote:
> I ran to this rump_nfs build problem when cross compiling current from last
> Thursday to evbarm with binutils 2.18.50:
> 
> #      link  rump_nfs/rump_nfs
> /home/mira/src/netbsd/netbsd-thumb/obj/tooldir.Linux-2.6.24-etchnhalf.1-686-unknown/bin/arm--netbsdelf-gcc
> -B/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib/
> -B/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib/
> -Wl,-nostdlib   -Wl,--wrap=malloc  -Wl,--fatal-warnings     -o rump_nfs
> getnfsargs.o mount_nfs.o rump_nfs.o pathadj.o fattr.o -lrumpfs_nfs
> -lrumpnet -lrumpnet_sockin -lrumpfs_nfs -lp2k -lukfs -lrumpvfs -lrump
> -lrumpuser -lpuffs -lutil -lpthread
> -L/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib
> -Wl,-rpath-link,/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/lib
> -L/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/lib
> -Wl,-rpath-link,/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib
> -L/home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib
> /home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib/librumpnet.so:
> undefined reference to `__start_link_set_domains'
> /home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib/librumpnet.so:
> undefined reference to `__stop_link_set_domains'
> collect2: ld returned 1 exit status
> 
> This is fixed by linking with rumpnet_net too, but since I'm not seeing this
> with plain current and its binutils 2.16.1, I'm not sure if it is really 
> needed. 
>
> diff --git a/usr.sbin/puffs/rump_nfs/Makefile b/usr.sbin/puffs/rump_nfs/Makefile
> index dfc4b3f..d516530 100644
> --- a/usr.sbin/puffs/rump_nfs/Makefile
(Continue reading)

Mikko Rapeli | 25 Nov 2008 13:35

Re: rump_nfs dependencies and binutils 2.18.50

On Tue, Nov 25, 2008 at 02:01:39PM +0200, Antti Kantee wrote:
> On Tue Nov 25 2008 at 13:48:39 +0200, Mikko Rapeli wrote:
> > /home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib/librumpnet.so:
> > undefined reference to `__start_link_set_domains'
> > /home/mira/src/netbsd/netbsd-thumb/obj/destdir.evbarm/usr/lib/librumpnet.so:
> > undefined reference to `__stop_link_set_domains'
> > collect2: ld returned 1 exit status
> 
> Curious, since as you can easily verify, rumpnet_sockin provides a
> networking domain and the "missing" symbols.

It does when compiled with binutils 2.16.1 from current but
doesn't after upgrade to 2.18.50. Odd.

current from today:

$../../../tooldir.Linux-2.6.24-etchnhalf.1-686-unknown/bin/arm--netbsdelf-objdump -t -T
librumpnet_sockin.so | grep  __start_link_set_domains
00009a7c g       *ABS*  00000000 __start_link_set_domains
00009a7c g    D  *ABS*  00000000 __start_link_set_domains

current from last Thursday with binutils 2.18.50:

$../../../tooldir.Linux-2.6.24-etchnhalf.1-686-unknown/bin/arm--netbsdelf-objdump -t -T
librumpnet_sockin.so | grep __start_link_set_domains

I've attached both symbol lists generated with 'objdump -t -T'.

-Mikko
(Continue reading)


Gmane