Port-evbmips archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Crosscompiling NetBSD for Fonera not working with HEAD?



Hi,

This is due to the -Wl,--fatal-warnings flags passed to ld(1). This
seems to be a known issue:

share/mk/bsd.sys.mk:
 Set linker warnings to be fatal
# XXX no proper way to avoid "FOO is a patented algorithm" warnings
# XXX on linking static libs
.if (!defined(MKPIC) || ${MKPIC} != "no") && \
    (!defined(LDSTATIC) || ${LDSTATIC} != "-static")
LDFLAGS+=       -Wl,--fatal-warnings
.endif

I wonder why the logic didn't do its job...

Btw, if FOO is not defined, it will expand to "", doesn't it ? So what
is the point of the !defined() check ?

 - Arnaud

On Sun, May 17, 2009 at 5:44 PM, Fredrik Pettai <pettai%nordu.net@localhost> 
wrote:
> On May 16, 2009, at 9:34 PM, David Young wrote:
>>
>> On Sat, May 16, 2009 at 01:13:04PM +0200, Fredrik Pettai wrote:
>>>
>>> I got a old FON2100 from a friend and thought it would be fun to try
>>> runing NetBSD on it.
>>
>> Cool!  I've run NetBSD on the Meraki, but never on a Fonera.
>>
>>> I searched and found this old thread:
>>> http://mail-index.netbsd.org/port-evbmips/2008/01/23/msg000012.html
>>> So I looked at the Changelog, and HEAD seems to have gotten at least
>>> ath(4) and HAL updated in HEAD.
>>> However, then I crosscompile the MERAKI kernel, it fails due to a
>>> missing file (from HAL i believe):
>>>
>>> /usr/src/sys/arch/mips/atheros/ar5315.c:72:75: error: contrib/dev/ath/
>>> ah_soc.h : No such file or directory
>>> nbmkdep: compile failed.
>>
>> It seems that the file has moved to
>> src/sys/external/isc/atheros_hal/dist/ah_soc.h.
>>
>> I think that you need to change the #include line to #include
>> "ah_soc.h", and to make sure that the kernel configuration
>> includes sys/external/isc/atheros_hal/conf/files.ath_hal and
>> sys/external/isc/atheros_hal/conf/std.ath_hal in one way or another.
>> You can use the i386 kernel configuration as an example:
>>
>> % grep external sys/arch/i386/conf/*
>> sys/arch/i386/conf/std.i386:include
>> "external/isc/atheros_hal/conf/std.ath_hal"
>>
>> % grep files.ath_hal sys/conf/*
>> sys/conf/files:include "external/isc/atheros_hal/conf/files.ath_hal"
>>
>> Let me know if you need more help.
>
> Okay, so now I tried to crosscompile userland (release) with
> LDSTATIC=-static set. That's maybe not the best or correct way of doing
> this?, but I'm lazy and then I can pick the binaries I want freely from the
> whole release and install those. But unfortunately my build fails (see
> output below).
> The only thing that I found regarding this error, was a comment referring to
> the same problem (trying to do a static build) in bin/40943. However, that
> was not the original problem of bin/40943, and I don't understand if and how
> they solved this problem I'm having...
>
> Re,
> /P
>
> # ./build.sh -m evbmips-eb -u release
> ...
> #      link  amd/amd
> /usr/src/tooldir.NetBSD-5.0_RC4-i386/bin/mipseb--netbsd-gcc
>  -B/usr/src/destdir.evbmips/usr/lib/ -B/usr/src/destdir.evbmips/usr/lib/
>  -Wl,-nostdlib    -Wl,--fatal-warnings   -static   -o amd  am_ops.o amd.o
> amfs_auto.o amfs_generic.o amfs_direct.o amfs_error.o amfs_host.o
> amfs_link.o amfs_linkx.o amfs_nfsl.o amfs_nfsx.o amfs_program.o amfs_root.o
> amfs_toplvl.o amfs_union.o amq_subr.o amq_svc.o autil.o clock.o conf.o
> get_args.o info_exec.o info_file.o info_ndbm.o info_passwd.o info_sun.o
> info_union.o map.o mapc.o mntfs.o nfs_prot_svc.o nfs_start.o nfs_subr.o
> ops_cdfs.o ops_efs.o ops_mfs.o ops_nfs.o ops_nfs3.o ops_nullfs.o ops_pcfs.o
> ops_tfs.o ops_tmpfs.o ops_udf.o ops_ufs.o ops_umapfs.o ops_unionfs.o opts.o
> readdir.o restart.o rpc_fwd.o sched.o srvr_amfs_auto.o srvr_nfs.o sun_map.o
> sun_map_parse.o sun_map_tok.o conf_parse.o conf_tok.o info_hesiod.o
> info_ldap.o info_nis.o -L/usr/src/external/bsd/am-utils/lib/libamu/obj -lamu
> -lldap -llber -lssl -lcrypto  -lrpcsvc
> -L/usr/src/external/bsd/am-utils/lib/libamu/obj -lamu
> -L/usr/src/destdir.evbmips/usr/lib
> -Wl,-rpath-link,/usr/src/destdir.evbmips/lib  -L/usr/src/destdir.evbmips/lib
> -Wl,-rpath-link,/usr/src/destdir.evbmips/usr/lib
>  -L/usr/src/destdir.evbmips/usr/lib
> /usr/src/destdir.evbmips/usr/lib/libcrypto.a(e_idea.o): In function
> `EVP_idea_ecb':
> e_idea.c:(.text+0x16c): warning: IDEA is a patented algorithm; link against
> libcrypto_idea.a
> e_idea.c:(.text+0x18c): warning: IDEA is a patented algorithm; link against
> libcrypto_idea.a
> e_idea.c:(.text+0x2d8): warning: IDEA is a patented algorithm; link against
> libcrypto_idea.a
> /usr/src/destdir.evbmips/usr/lib/libcrypto.a(i_ecb.o): In function
> `idea_ecb_encrypt':
> i_ecb.c:(.text+0x84): warning: IDEA is a patented algorithm; link against
> libcrypto_idea.a
> collect2: ld returned 1 exit status
>
> *** Failed target:  amd
> *** Failed command:
> /usr/src/tooldir.NetBSD-5.0_RC4-i386/bin/mipseb--netbsd-gcc
> -B/usr/src/destdir.evbmips/usr/lib/ -B/usr/src/destdir.evbmips/usr/lib/
> -Wl,-nostdlib -Wl,--fatal-warnings -static -o amd am_ops.o amd.o amfs_auto.o
> amfs_generic.o amfs_direct.o amfs_error.o amfs_host.o amfs_link.o
> amfs_linkx.o amfs_nfsl.o amfs_nfsx.o amfs_program.o amfs_root.o
> amfs_toplvl.o amfs_union.o amq_subr.o amq_svc.o autil.o clock.o conf.o
> get_args.o info_exec.o info_file.o info_ndbm.o info_passwd.o info_sun.o
> info_union.o map.o mapc.o mntfs.o nfs_prot_svc.o nfs_start.o nfs_subr.o
> ops_cdfs.o ops_efs.o ops_mfs.o ops_nfs.o ops_nfs3.o ops_nullfs.o ops_pcfs.o
> ops_tfs.o ops_tmpfs.o ops_udf.o ops_ufs.o ops_umapfs.o ops_unionfs.o opts.o
> readdir.o restart.o rpc_fwd.o sched.o srvr_amfs_auto.o srvr_nfs.o sun_map.o
> sun_map_parse.o sun_map_tok.o conf_parse.o conf_tok.o info_hesiod.o
> info_ldap.o info_nis.o -L/usr/src/external/bsd/am-utils/lib/libamu/obj -lamu
> -lldap -llber -lssl -lcrypto -lrpcsvc
> -L/usr/src/external/bsd/am-utils/lib/libamu/obj -lamu
> -L/usr/src/destdir.evbmips/usr/lib
> -Wl,-rpath-link,/usr/src/destdir.evbmips/lib -L/usr/src/destdir.evbmips/lib
> -Wl,-rpath-link,/usr/src/destdir.evbmips/usr/lib
> -L/usr/src/destdir.evbmips/usr/lib
> *** Error code 1
>
> Stop.
> nbmake: stopped in /usr/src/external/bsd/am-utils/bin/amd
>
> ...
>
> ERROR: Failed to make release
> *** BUILD ABORTED ***
>
>
>


Home | Main Index | Thread Index | Old Index