Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Dec 2014 17:22:45 -0600
From:      Larry Rosenman <ler@lerctr.org>
To:        Ian Lepore <ian@freebsd.org>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: lsof on FreeBSD/arm
Message-ID:  <7aad6804880fa6a6b65ed43025a2ee57@thebighonker.lerctr.org>
In-Reply-To: <1419374279.1018.144.camel@freebsd.org>
References:  <dfbaf5451abce25b512efe4f8c80ff58@thebighonker.lerctr.org> <1419362189.1018.138.camel@freebsd.org> <c9bcab9ff5aa4a67ec290908e72a53c9@thebighonker.lerctr.org> <1419367656.1018.142.camel@freebsd.org> <48ad36516ffbabbecf6ab3c53031bfb3@thebighonker.lerctr.org> <1419374279.1018.144.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2014-12-23 16:37, Ian Lepore wrote:
> On Tue, 2014-12-23 at 16:29 -0600, Larry Rosenman wrote:
>> On 2014-12-23 14:47, Ian Lepore wrote:
>> > On Tue, 2014-12-23 at 14:02 -0600, Larry Rosenman wrote:
>> >> On 2014-12-23 13:16, Ian Lepore wrote:
>> >> > On Tue, 2014-12-23 at 11:29 -0600, Larry Rosenman wrote:
>> >> >> Greetings,
>> >> >>      I'm the maintainer of the sysutils/lsof port for FreeBSD.  It's
>> >> >> been
>> >> >> reported to me that the port doesn't compile on arm.  In investigating
>> >> >> that, I found that some of the includes that lsof includes need a cpu
>> >> >> type defined in order to compile (machine/cpuconf.h).
>> >> >>
>> >> >> Is there a reason that there is no "default" cpu defined either by the
>> >> >> compiler or environment?
>> >> >>
>> >> >> Playing in a armv6 poudriere jail, I found I can get it to compile
>> >> >> via:
>> >> >> borg.lerctr.org /usr/local/etc/poudriere.d $ cat p110armv6-make.conf
>> >> >> CFLAGS += -DCPU_ARM1136=1
>> >> >> borg.lerctr.org /usr/local/etc/poudriere.d $
>> >> >>
>> >> >> However, I'm not sure if that's kosher for a port to just define.
>> >> >>
>> >> >> Can any of the arm experts help here?
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> > See if the attached patch helps.  The specific type of cpu shouldn't
>> >> > really matter outside the kernel (or even inside it except in a couple
>> >> > places), what usually matters is the architecture, which we've
>> >> > simplified to v4 versus v6 for most purposes.
>> >> >
>> >> > The attached patch will use the compiler's predefined values for arch
>> >> > to
>> >> > set our old-school symbols, which we really need to do a big cleanup
>> >> > pass on, but hopefully this little hack will get you going until that
>> >> > gets done.  Let me know if this works and I'll commit it.
>> >> >
>> >> > -- Ian
>> >> Thanks.  I'm having a hard time convincing poudriere to apply this
>> >> patch
>> >> to the environment
>> >>
>> >> Any ideas?
>> >
>> > Hrm, I seem to have fumbled the cpuconf.h attachment on the last try.
>> >
>> > -- Ian
>> still get:
>> --- dproc.o ---
>> In file included from ./dlsof.h:90:
>> In file included from /usr/src/sys/sys/conf.h:44:
>> In file included from /usr/src/sys/sys/eventhandler.h:34:
>> In file included from /usr/src/sys/sys/mutex.h:40:
>> In file included from /usr/src/sys/sys/pcpu.h:48:
>> In file included from /usr/include/machine/pcpu.h:35:
>> /usr/include/machine/cpuconf.h:180:2: error: ARM_NMMUS is 0
>> 
>> so we still need some more help here.
>> 
>> 
> 
> Urk, there were even more cpu-specific tests were lurking further down
> in the file.  See if this fixes it...
> 
> -- Ian
Bingo -- clean build.....
--- lsof ---
qemu: unsupported syscall: 82 (calling anyway)
cc -o lsof  -pipe -DNEEDS_BOOL_TYPEDEF -fno-strict-aliasing -DHASTASKS 
-DHAS_PAUSE_SBT -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT 
-DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 
-DHAS_VM_MEMATTR_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H 
-DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB 
-DNEEDS_BOOLEAN_T -DHAS_SB_CCC -DHAS_FDESCENTTBL -DFREEBSDV=11000 
-DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX 
-DHAS_STRFTIME -DLSOF_VSTR=\"11.0-CURRENT\" -I/usr/src/sys -O dmnt.o 
dnode.o dnode1.o dnode2.o dproc.o dsock.o dstore.o  arg.o main.o misc.o 
node.o print.o proc.o store.o usage.o  util.o -L./lib -llsof  -lkvm

Thank You, Ian!
-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 214-642-9640                 E-Mail: ler@lerctr.org
US Mail: 108 Turvey Cove, Hutto, TX 78634-5688



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