-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to build on FreeBSD PowerPC64 #69
Comments
I'll ask the PPC guys. Is ZFS supported on PPC64? If not, we (lsof) need to detect that. (I'm the FreeBSD maintainer for sysutils/lsof). I'm AKA [email protected] |
I think ZFS is supported on ppc64, I am not using it as my fs, but looks like the kernel module is loaded: root@PowerMacG5:~ # kldload zfs |
I pinged Mark Linimon [email protected] and apparently, it's been broken for a long time. I don't have PPC* hardware to test on. Patches welcome. |
As far as reading dnode2.c, abd_* are not referred directly.
Then you will get dnode2.o with symbol information. I would like to see the output of the objdump. |
Hi, I'm currently getting another error, I'm running FreeBSD Current: (cd lib; make DEBUG="-g" CFGF="-pipe -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHAS_DUP2 -DHAS_CLOSEFROM -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT -DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_IDEV -DHAS_VM_MEMATTR_T -DNEEDS_DEVICE_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHASFUSEFS -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DHAS_SB_CCC -DHAS_FDESCENTTBL -DFREEBSDV=13000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR="13.0-CURRENT"") Stop. |
Hi, so checking out https://github.com/lrosenman/lsof/tree/fix-refcount gets me back to this: cc -o lsof -pipe -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHAS_DUP2 -DHAS_CLOSEFROM -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT -DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_IDEV -DHAS_VM_MEMATTR_T -DNEEDS_DEVICE_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHASFUSEFS -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DHAS_SB_CCC -DHAS_FDESCENTTBL -DFREEBSDV=13000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR="13.0-CURRENT" -I/usr/src/sys -O2 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 running: objdump -d -S -l dnode2.o dnode2.o: file format elf64-powerpc-freebsd 88: 38 a0 01 10 li r5,272 000000000000015c <.abd_zero>: 0000000000000194 <.abd_cmp_buf>: 000000000000023c <.abd_copy>: |
in the Makefile, if change: CFGL= -L./lib -llsof -lkvm to CFGL= -L./lib -llsof -lkvm -lzpool it compiles without errors. |
I wonder why ppc* needs -lzpool and none of the other FreeBSD dialects do? |
Don't you omit some lines between above two lines?
|
Hi, sorry, was copy / paste from a terminal window must have missed it, here is the full objdump without adding -lzpool to the Makefile, and with DEBUG = g dnode2.o: file format elf64-powerpc-freebsd Disassembly of section .text: 0000000000000000 <.abd_is_linear>: 0000000000000018 <.dmu_buf_init_user>: 0000000000000030 <._cv_timedwait_sbt>: 0000000000000044 <.readzfsnode>: 000000000000015c <.abd_zero>: 0000000000000194 <.abd_cmp_buf>: 00000000000001cc <.abd_copy_to_buf>: 0000000000000204 <.abd_copy_from_buf>: 000000000000023c <.abd_copy>: |
Hi, not the cleanest solution, but adding something like this gets it building again! --- a/Configure
+#Fix FreeBSD PowerPC build
|
Thank you. But I would like to know what happens behind the scene more. I would like to see the output of execution of two command lines without OMITTING lines.
The output will be long. So, please paste them to your gist or send them to "[email protected]". You may know C language. So I would like to hear your comment. |
Hi, do you want the outputs with the debug -g set in the Makefile? |
Yes, please add -g to DEBUG of Makefile. Removing -O from DEBUG is better. If possible, I would like to put your lsof source tree after building somewhere I can get download. |
@TheXCoder, thank you, I received the output. Now I understand where adb_* functions come from. They come from sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h.
They are inline functions. Though abd_ functions are not included in dnode2.c, the inline functions are replaced in dnode2.c. abd_copy is o.k. It is expaned inline in dnode2.c. How about adb_copy_off called from abd_copy? It is declared in abd.h. However, it is not an inline function. Why does this happen only PowerPC? I'm running freebsd 11.2-released r3355510 on kvm of linux. adb_copy in sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h on r3355510 has inline modifier, too. However, the output of objdump for dnode2.o on the platform doesn't include the definition of abd_copy. It is not expand inline. I will study more the impact of "inline" modifier on x86_64 FreeBSD. Linking libzpool.so to lsof, the solution you proposed, is acceptable. Another one is specifying "don't expand inline unused function" option to compilers. I have no time more for now. I will report again when I get progress. |
BTW, you didn't any lines. I misunderstood "..." in objdump output. I'm sorry about my wrong suspecting. |
I joined the discussion, and I wanted to study FreeBSD. However, I find I don't have enough time to do so. I will not work this topic anymore. |
I have patches in the FreeBSD port that I will work on getting into our (lsof-org) master. @masatake what's the process for requesting/making a release for a particular dialect (or all if that's necessary)? |
Does "making a release for a particular dialect" mean "making a tarball including only the particular dialect? |
Yes. Making a tar / tag that can pull just FreeBSD for example. Or what's the process for me to ask for a release tag? |
Do you have strong reason to make a tarball for the specified dialect? I myself want to make a taball for linux. See my reason #89. |
Just a way to get a FreeBSD "fixup" release like Vic used to do between releases here. I.E. so I can update the port and lose some of the patches after I merge them. |
I should change the question. My idea of the process for releasing is that just making a release if one of us wants. In such a isse, we can agree:
The tarball should be made the person who such a issue. |
I'm fine with it including ALL dialects. I just need to know what the process is, and what interlocks there are between all of us for making a release from master. |
I see. Let's continue the discussion at #96. |
Hi, sysutils/lsof fails to build on FreeBSD / PowerPC64 with the following error:
cc -o lsof -pipe -fstack-protector-strong -fno-strict-aliasing -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHAS_DUP2 -DHAS_CLOSEFROM -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT -DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_IDEV -DHAS_VM_MEMATTR_T -DNEEDS_DEVICE_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHASFUSEFS -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DHAS_SB_CCC -DHAS_FDESCENTTBL -DFREEBSDV=13000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR="13.0-CURRENT" -I/usr/src/sys -O2 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
dnode2.o:(.text+0x190): undefined reference to
abd_zero_off' dnode2.o:(.text+0x1c8): undefined reference to
abd_cmp_buf_off'dnode2.o:(.text+0x200): undefined reference to
abd_copy_to_buf_off' dnode2.o:(.text+0x238): undefined reference to
abd_copy_from_buf_off'dnode2.o:(.text+0x274): undefined reference to `abd_copy_off'
*** Error code 1
Stop.
make[1]: stopped in /wrkdirs/usr/ports/sysutils/lsof/work/lsof-4.93.2
*** Error code 1
Stop.
make: stopped in /usr/ports/sysutils/lsof
This is from: http://pylon.nyi.freebsd.org/data/head-powerpc64-default/p506720_s350020/logs/errors/lsof-4.93.2_2,8.log
There is a mention of some one getting it to pass by adding -lzpool in the email posting: http://freebsd.1045724.x6.nabble.com/lsof-doesn-t-compile-on-my-ppc64-td6294887.html
Regards
The text was updated successfully, but these errors were encountered: