From: anonymous c. <nas...@us...> - 2016-07-30 03:48:57
|
# git clone git://repo.or.cz/nasm.git nasm # ./autogen.sh # ./configure # make [...] In file included from asm/nasm.c:48: In file included from ./include/nasm.h:45: ./asm/preproc.h:42:10: fatal error: 'pptok.h' file not found #include "pptok.h" ^ 4 warnings and 1 error generated. make: *** [asm/nasm.o] Error 1 # ls asm/pptok.* asm/pptok.dat asm/pptok.pl # asm/pptok.pl Can't locate phash.ph in @INC (did you run h2ph?) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at asm/pptok.pl line 39. # h2ph Cannot open /Library/Perl/5.18/darwin-thread-multi-2level/_h2ph_pre.ph: Permission denied at /usr/bin/h2ph5.18 line 756. # make asm/pptok.h perl -I./perllib -I. ./asm/pptok.pl h \ ./asm/pptok.dat asm/pptok.h # ls asm/pptok.* asm/pptok.dat asm/pptok.h asm/pptok.pl # make [...] In file included from asm/nasm.c:48: ./include/nasm.h:46:10: fatal error: 'insnsi.h' file not found #include "insnsi.h" /* For enum opcode */ ^ 4 warnings and 1 error generated. make: *** [asm/nasm.o] Error 1 The problem then repeats itself for every script-generated file. I can manually invoke make for each of them, to get closer by each step. But clearly that's not what's supposed to happen... |
From: H. P. A. <hp...@zy...> - 2016-08-01 21:14:28
|
On July 29, 2016 8:48:50 PM PDT, anonymous coward <nas...@us...> wrote: ># git clone git://repo.or.cz/nasm.git nasm > ># ./autogen.sh ># ./configure ># make >[...] >In file included from asm/nasm.c:48: >In file included from ./include/nasm.h:45: >./asm/preproc.h:42:10: fatal error: 'pptok.h' file not found >#include "pptok.h" > ^ >4 warnings and 1 error generated. >make: *** [asm/nasm.o] Error 1 > ># ls asm/pptok.* >asm/pptok.dat asm/pptok.pl > ># asm/pptok.pl >Can't locate phash.ph in @INC (did you run h2ph?) (@INC contains: >/Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 >/Network/Library/Perl/5.18/darwin-thread-multi-2level >/Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2 >/System/Library/Perl/5.18/darwin-thread-multi-2level >/System/Library/Perl/5.18 >/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level >/System/Library/Perl/Extras/5.18 .) at asm/pptok.pl line 39. > ># h2ph >Cannot open /Library/Perl/5.18/darwin-thread-multi-2level/_h2ph_pre.ph: > Permission denied at /usr/bin/h2ph5.18 line 756. > ># make asm/pptok.h >perl -I./perllib -I. ./asm/pptok.pl h \ > ./asm/pptok.dat asm/pptok.h > ># ls asm/pptok.* >asm/pptok.dat asm/pptok.h asm/pptok.pl > ># make >[...] >In file included from asm/nasm.c:48: >./include/nasm.h:46:10: fatal error: 'insnsi.h' file not found >#include "insnsi.h" /* For enum opcode */ > ^ >4 warnings and 1 error generated. >make: *** [asm/nasm.o] Error 1 > >The problem then repeats itself for every script-generated file. >I can manually invoke make for each of them, to get closer by >each step. But clearly that's not what's supposed to happen... > >------------------------------------------------------------------------------ >_______________________________________________ >Nasm-devel mailing list >Nas...@li... >https://lists.sourceforge.net/lists/listinfo/nasm-devel Looks like the Perl include path is buggered... will look. -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting. |
From: H. P. A. <hp...@zy...> - 2016-08-02 16:37:27
|
On 08/02/16 07:23, Cyrill Gorcunov wrote: > On Tue, Aug 02, 2016 at 06:54:54AM -0700, anonymous coward wrote: >> >> I'm not sure what to try next -- nasmlib.a seems to contain the >> symbol, but somehow ld fails? > > I think --whole-archive option needed for ld > That would defeat the entire purpose with the library, though. After thinking about it, I decided to add the -fno-common compiler option (if supported.) Current NASM coding standard is to not use common data anyway, and that will help us spot mistakes. Hopefully that will work around the problem. -hpa |
From: anonymous c. <nas...@us...> - 2016-08-02 16:48:17
|
> I think --whole-archive option needed for ld not supported under OS X, it seems -- the ld man page doesn't have it, and there are hits in web searches for this very topic |
From: Cyrill G. <gor...@gm...> - 2016-08-02 16:48:19
|
On Tue, Aug 02, 2016 at 09:37:15AM -0700, H. Peter Anvin wrote: > On 08/02/16 07:23, Cyrill Gorcunov wrote: > > On Tue, Aug 02, 2016 at 06:54:54AM -0700, anonymous coward wrote: > >> > >> I'm not sure what to try next -- nasmlib.a seems to contain the > >> symbol, but somehow ld fails? > > > > I think --whole-archive option needed for ld > > > > That would defeat the entire purpose with the library, though. How? IIRC --whole-archive tells linker to look into all objects in archive instead of first one. > > After thinking about it, I decided to add the -fno-common compiler > option (if supported.) Current NASM coding standard is to not use > common data anyway, and that will help us spot mistakes. > > Hopefully that will work around the problem. > > -hpa > Cyrill |
From: H. P. A. <hp...@zy...> - 2016-08-02 16:52:14
|
On 08/02/16 09:48, Cyrill Gorcunov wrote: > On Tue, Aug 02, 2016 at 09:37:15AM -0700, H. Peter Anvin wrote: >> On 08/02/16 07:23, Cyrill Gorcunov wrote: >>> On Tue, Aug 02, 2016 at 06:54:54AM -0700, anonymous coward wrote: >>>> >>>> I'm not sure what to try next -- nasmlib.a seems to contain the >>>> symbol, but somehow ld fails? >>> >>> I think --whole-archive option needed for ld >>> >> >> That would defeat the entire purpose with the library, though. > > How? IIRC --whole-archive tells linker to look into all objects > in archive instead of first one. No, it always does that. --whole-archive means "include all objects in the archive in the final executable", regardless of if an object is needed or not. The whole point of the exercise was to reduce the size of especially ndisasm by omitting objects it really doesn't need. -hpa |
From: Cyrill G. <gor...@gm...> - 2016-08-02 16:51:27
|
On Tue, Aug 02, 2016 at 09:48:11AM -0700, anonymous coward wrote: > > I think --whole-archive option needed for ld > > not supported under OS X, it seems -- the ld > man page doesn't have it, and there are hits > in web searches for this very topic I hit the same problem in other project where i've been linking objects and archive file into executable. But since it's unsupported on osx, won't help. Thanks for trying! |
From: Cyrill G. <gor...@gm...> - 2016-08-01 21:40:47
|
On Mon, Aug 01, 2016 at 02:14:10PM -0700, H. Peter Anvin wrote: > > Looks like the Perl include path is buggered... will look. It's something with perl setup. I've built nasm on el-capitan without problem (but iirc I've been using brew tool to install perl) |
From: H. P. A. <hp...@zy...> - 2016-08-01 22:31:37
|
On August 1, 2016 2:40:38 PM PDT, Cyrill Gorcunov <gor...@gm...> wrote: >On Mon, Aug 01, 2016 at 02:14:10PM -0700, H. Peter Anvin wrote: >> >> Looks like the Perl include path is buggered... will look. > >It's something with perl setup. I've built nasm on el-capitan >without problem (but iirc I've been using brew tool to install >perl) I don't think so per se... the Perl include path should let it fund phash.ph. -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting. |
From: H. P. A. <hp...@zy...> - 2016-08-01 22:32:14
|
On August 1, 2016 2:40:38 PM PDT, Cyrill Gorcunov <gor...@gm...> wrote: >On Mon, Aug 01, 2016 at 02:14:10PM -0700, H. Peter Anvin wrote: >> >> Looks like the Perl include path is buggered... will look. > >It's something with perl setup. I've built nasm on el-capitan >without problem (but iirc I've been using brew tool to install >perl) It's possible system dependencies is making a bug, though. -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting. |
From: H. P. A. <hp...@zy...> - 2016-08-01 22:32:27
|
On August 1, 2016 2:40:38 PM PDT, Cyrill Gorcunov <gor...@gm...> wrote: >On Mon, Aug 01, 2016 at 02:14:10PM -0700, H. Peter Anvin wrote: >> >> Looks like the Perl include path is buggered... will look. > >It's something with perl setup. I've built nasm on el-capitan >without problem (but iirc I've been using brew tool to install >perl) Masking... -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting. |
From: H. P. A. <hp...@zy...> - 2016-08-02 17:02:17
|
On 08/02/16 09:51, Cyrill Gorcunov wrote: > On Tue, Aug 02, 2016 at 09:48:11AM -0700, anonymous coward wrote: >>> I think --whole-archive option needed for ld >> >> not supported under OS X, it seems -- the ld >> man page doesn't have it, and there are hits >> in web searches for this very topic > > I hit the same problem in other project where i've been > linking objects and archive file into executable. But > since it's unsupported on osx, won't help. Thanks for > trying! > It's a massive hammer, though, and almost always wrong. Other than some serious low-level programming, the most legitimate use for it is when you have objects in an archive that will be needed by subsequently dlopen()'d objects. -hpa |
From: Cyrill G. <gor...@gm...> - 2016-08-02 17:10:09
|
On Tue, Aug 02, 2016 at 10:02:05AM -0700, H. Peter Anvin wrote: > > It's a massive hammer, though, and almost always wrong. Other than some > serious low-level programming, the most legitimate use for it is when > you have objects in an archive that will be needed by subsequently > dlopen()'d objects. Yeah, seems so. This option saved me a lot of time because I needed a fast project prototype (and it's low level -- object files get converted into binary stream which get used by another programs then) -- so once things get semi-done I'll check if there a way to drop this flag completely. For same reason I proposed to try it, because it's fast to test and figure out if it solve the problem or not. |
From: anonymous c. <nas...@us...> - 2016-08-01 23:35:15
|
yeah, building definitely worked on this system a while back... but since then OS X has seen a bunch of updates... as has NASM's make fwiw, even with a step by step process... sh autogen.sh sh configure make make asm/pptok.h make make x86/insnsi.h make make asm/directiv.h make make x86/regs.h make make asm/tokens.h make make x86/iflaggen.h make ...I get this at the end: gcc -c -g -O2 -fwrapv -W -Wall -std=c99 -pedantic -Werror=unknown-warning-option -Wno-long-long -Werror=implicit -Werror=missing-braces -Werror=return-type -Werror=trigraphs -Werror=pointer-arith -Werror=strict-prototypes -Werror=missing-prototypes -Werror=missing-declarations -Werror=comment -Werror=vla -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I./x86 -I./x86 -I./asm -I./asm -I./disasm -I./disasm -I./output -I./output -o x86/iflag.o x86/iflag.c rm -f libnasm.a ar cq libnasm.a stdlib/snprintf.o stdlib/vsnprintf.o stdlib/strlcpy.o stdlib/strnlen.o nasmlib/ver.o nasmlib/crc64.o nasmlib/malloc.o nasmlib/error.o nasmlib/md5c.o nasmlib/string.o nasmlib/file.o nasmlib/ilog2.o nasmlib/realpath.o nasmlib/filename.o nasmlib/srcfile.o nasmlib/zerobuf.o nasmlib/readnum.o nasmlib/bsi.o nasmlib/rbtree.o nasmlib/hashtbl.o nasmlib/raa.o nasmlib/saa.o common/common.o x86/insnsa.o x86/insnsb.o x86/insnsd.o x86/insnsn.o x86/regs.o x86/regvals.o x86/regflags.o x86/regdis.o x86/disp8.o x86/iflag.o /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(snprintf.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(vsnprintf.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(strlcpy.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(strnlen.o) has no symbols ranlib libnasm.a /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(snprintf.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(vsnprintf.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(strlcpy.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(strnlen.o) has no symbols gcc -o nasm asm/nasm.o asm/float.o asm/directiv.o asm/assemble.o asm/labels.o asm/parser.o asm/preproc.o asm/quote.o asm/pptok.o asm/listing.o asm/eval.o asm/exprlib.o asm/stdscan.o asm/strfunc.o asm/tokhash.o asm/segalloc.o asm/preproc-nop.o asm/rdstrnum.o macros/macros.o output/outform.o output/outlib.o output/nulldbg.o output/nullout.o output/outbin.o output/outaout.o output/outcoff.o output/outelf.o output/outobj.o output/outas86.o output/outrdf2.o output/outdbg.o output/outieee.o output/outmacho.o output/codeview.o libnasm.a Undefined symbols for architecture x86_64: "_zero_buffer", referenced from: _assemble in assemble.o _out in assemble.o _macho32_init in outmacho.o _macho64_init in outmacho.o _fwritezero in libnasm.a(file.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [nasm] Error 1 |
From: H. P. A. <hp...@zy...> - 2016-08-01 23:42:24
|
On August 1, 2016 4:35:08 PM PDT, anonymous coward <nas...@us...> wrote: >yeah, building definitely worked on this system >a while back... but since then OS X has seen a >bunch of updates... as has NASM's make > >fwiw, even with a step by step process... > > sh autogen.sh > sh configure > > make > make asm/pptok.h > make > make x86/insnsi.h > make > make asm/directiv.h > make > make x86/regs.h > make > make asm/tokens.h > make > make x86/iflaggen.h > make > >...I get this at the end: > >gcc -c -g -O2 -fwrapv -W -Wall -std=c99 -pedantic >-Werror=unknown-warning-option -Wno-long-long -Werror=implicit >-Werror=missing-braces -Werror=return-type -Werror=trigraphs >-Werror=pointer-arith -Werror=strict-prototypes >-Werror=missing-prototypes -Werror=missing-declarations >-Werror=comment -Werror=vla -DHAVE_CONFIG_H -I. -I. -I./include >-I./include -I./x86 -I./x86 -I./asm -I./asm -I./disasm -I./disasm >-I./output -I./output -o x86/iflag.o x86/iflag.c >rm -f libnasm.a >ar cq libnasm.a stdlib/snprintf.o stdlib/vsnprintf.o stdlib/strlcpy.o >stdlib/strnlen.o nasmlib/ver.o nasmlib/crc64.o nasmlib/malloc.o >nasmlib/error.o nasmlib/md5c.o nasmlib/string.o nasmlib/file.o >nasmlib/ilog2.o nasmlib/realpath.o nasmlib/filename.o >nasmlib/srcfile.o nasmlib/zerobuf.o nasmlib/readnum.o nasmlib/bsi.o >nasmlib/rbtree.o nasmlib/hashtbl.o nasmlib/raa.o nasmlib/saa.o >common/common.o x86/insnsa.o x86/insnsb.o x86/insnsd.o x86/insnsn.o >x86/regs.o x86/regvals.o x86/regflags.o x86/regdis.o x86/disp8.o >x86/iflag.o >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(snprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(vsnprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strlcpy.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strnlen.o) has no symbols >ranlib libnasm.a >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(snprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(vsnprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strlcpy.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strnlen.o) has no symbols > >gcc -o nasm asm/nasm.o asm/float.o asm/directiv.o asm/assemble.o >asm/labels.o asm/parser.o asm/preproc.o asm/quote.o asm/pptok.o >asm/listing.o asm/eval.o asm/exprlib.o asm/stdscan.o asm/strfunc.o >asm/tokhash.o asm/segalloc.o asm/preproc-nop.o asm/rdstrnum.o >macros/macros.o output/outform.o output/outlib.o output/nulldbg.o >output/nullout.o output/outbin.o output/outaout.o output/outcoff.o >output/outelf.o output/outobj.o output/outas86.o output/outrdf2.o >output/outdbg.o output/outieee.o output/outmacho.o output/codeview.o >libnasm.a >Undefined symbols for architecture x86_64: > "_zero_buffer", referenced from: > _assemble in assemble.o > _out in assemble.o > _macho32_init in outmacho.o > _macho64_init in outmacho.o > _fwritezero in libnasm.a(file.o) >ld: symbol(s) not found for architecture x86_64 >clang: error: linker command failed with exit code 1 (use -v to see >invocation) >make: *** [nasm] Error 1 Dependency issues? -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting. |
From: H. P. A. <hp...@zy...> - 2016-08-01 23:42:54
|
On August 1, 2016 4:35:08 PM PDT, anonymous coward <nas...@us...> wrote: >yeah, building definitely worked on this system >a while back... but since then OS X has seen a >bunch of updates... as has NASM's make > >fwiw, even with a step by step process... > > sh autogen.sh > sh configure > > make > make asm/pptok.h > make > make x86/insnsi.h > make > make asm/directiv.h > make > make x86/regs.h > make > make asm/tokens.h > make > make x86/iflaggen.h > make > >...I get this at the end: > >gcc -c -g -O2 -fwrapv -W -Wall -std=c99 -pedantic >-Werror=unknown-warning-option -Wno-long-long -Werror=implicit >-Werror=missing-braces -Werror=return-type -Werror=trigraphs >-Werror=pointer-arith -Werror=strict-prototypes >-Werror=missing-prototypes -Werror=missing-declarations >-Werror=comment -Werror=vla -DHAVE_CONFIG_H -I. -I. -I./include >-I./include -I./x86 -I./x86 -I./asm -I./asm -I./disasm -I./disasm >-I./output -I./output -o x86/iflag.o x86/iflag.c >rm -f libnasm.a >ar cq libnasm.a stdlib/snprintf.o stdlib/vsnprintf.o stdlib/strlcpy.o >stdlib/strnlen.o nasmlib/ver.o nasmlib/crc64.o nasmlib/malloc.o >nasmlib/error.o nasmlib/md5c.o nasmlib/string.o nasmlib/file.o >nasmlib/ilog2.o nasmlib/realpath.o nasmlib/filename.o >nasmlib/srcfile.o nasmlib/zerobuf.o nasmlib/readnum.o nasmlib/bsi.o >nasmlib/rbtree.o nasmlib/hashtbl.o nasmlib/raa.o nasmlib/saa.o >common/common.o x86/insnsa.o x86/insnsb.o x86/insnsd.o x86/insnsn.o >x86/regs.o x86/regvals.o x86/regflags.o x86/regdis.o x86/disp8.o >x86/iflag.o >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(snprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(vsnprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strlcpy.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strnlen.o) has no symbols >ranlib libnasm.a >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(snprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(vsnprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strlcpy.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strnlen.o) has no symbols > >gcc -o nasm asm/nasm.o asm/float.o asm/directiv.o asm/assemble.o >asm/labels.o asm/parser.o asm/preproc.o asm/quote.o asm/pptok.o >asm/listing.o asm/eval.o asm/exprlib.o asm/stdscan.o asm/strfunc.o >asm/tokhash.o asm/segalloc.o asm/preproc-nop.o asm/rdstrnum.o >macros/macros.o output/outform.o output/outlib.o output/nulldbg.o >output/nullout.o output/outbin.o output/outaout.o output/outcoff.o >output/outelf.o output/outobj.o output/outas86.o output/outrdf2.o >output/outdbg.o output/outieee.o output/outmacho.o output/codeview.o >libnasm.a >Undefined symbols for architecture x86_64: > "_zero_buffer", referenced from: > _assemble in assemble.o > _out in assemble.o > _macho32_init in outmacho.o > _macho64_init in outmacho.o > _fwritezero in libnasm.a(file.o) >ld: symbol(s) not found for architecture x86_64 >clang: error: linker command failed with exit code 1 (use -v to see >invocation) >make: *** [nasm] Error 1 What happens if you run "make alldeps" before making? -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting. |
From: H. P. A. <hp...@zy...> - 2016-08-01 23:45:25
|
On August 1, 2016 4:35:08 PM PDT, anonymous coward <nas...@us...> wrote: >yeah, building definitely worked on this system >a while back... but since then OS X has seen a >bunch of updates... as has NASM's make > >fwiw, even with a step by step process... > > sh autogen.sh > sh configure > > make > make asm/pptok.h > make > make x86/insnsi.h > make > make asm/directiv.h > make > make x86/regs.h > make > make asm/tokens.h > make > make x86/iflaggen.h > make > >...I get this at the end: > >gcc -c -g -O2 -fwrapv -W -Wall -std=c99 -pedantic >-Werror=unknown-warning-option -Wno-long-long -Werror=implicit >-Werror=missing-braces -Werror=return-type -Werror=trigraphs >-Werror=pointer-arith -Werror=strict-prototypes >-Werror=missing-prototypes -Werror=missing-declarations >-Werror=comment -Werror=vla -DHAVE_CONFIG_H -I. -I. -I./include >-I./include -I./x86 -I./x86 -I./asm -I./asm -I./disasm -I./disasm >-I./output -I./output -o x86/iflag.o x86/iflag.c >rm -f libnasm.a >ar cq libnasm.a stdlib/snprintf.o stdlib/vsnprintf.o stdlib/strlcpy.o >stdlib/strnlen.o nasmlib/ver.o nasmlib/crc64.o nasmlib/malloc.o >nasmlib/error.o nasmlib/md5c.o nasmlib/string.o nasmlib/file.o >nasmlib/ilog2.o nasmlib/realpath.o nasmlib/filename.o >nasmlib/srcfile.o nasmlib/zerobuf.o nasmlib/readnum.o nasmlib/bsi.o >nasmlib/rbtree.o nasmlib/hashtbl.o nasmlib/raa.o nasmlib/saa.o >common/common.o x86/insnsa.o x86/insnsb.o x86/insnsd.o x86/insnsn.o >x86/regs.o x86/regvals.o x86/regflags.o x86/regdis.o x86/disp8.o >x86/iflag.o >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(snprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(vsnprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strlcpy.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strnlen.o) has no symbols >ranlib libnasm.a >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(snprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(vsnprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strlcpy.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strnlen.o) has no symbols > >gcc -o nasm asm/nasm.o asm/float.o asm/directiv.o asm/assemble.o >asm/labels.o asm/parser.o asm/preproc.o asm/quote.o asm/pptok.o >asm/listing.o asm/eval.o asm/exprlib.o asm/stdscan.o asm/strfunc.o >asm/tokhash.o asm/segalloc.o asm/preproc-nop.o asm/rdstrnum.o >macros/macros.o output/outform.o output/outlib.o output/nulldbg.o >output/nullout.o output/outbin.o output/outaout.o output/outcoff.o >output/outelf.o output/outobj.o output/outas86.o output/outrdf2.o >output/outdbg.o output/outieee.o output/outmacho.o output/codeview.o >libnasm.a >Undefined symbols for architecture x86_64: > "_zero_buffer", referenced from: > _assemble in assemble.o > _out in assemble.o > _macho32_init in outmacho.o > _macho64_init in outmacho.o > _fwritezero in libnasm.a(file.o) >ld: symbol(s) not found for architecture x86_64 >clang: error: linker command failed with exit code 1 (use -v to see >invocation) >make: *** [nasm] Error 1 Reorganizing the source code certainly has both caused and exposed dependency issues. -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting. |
From: Dave Y. <dav...@gm...> - 2016-08-02 00:21:01
|
On 08/01/16 04:45 PM, H. Peter Anvin wrote: > Reorganizing the source code certainly has both caused and exposed dependency issues. > -- I tried building trunk (freshly checked out) on OS/2. Dies here, ... perl -I./perllib -I. ./asm/tokhash.pl c \ ./x86/insns.dat ./x86/regs.dat \ ./asm/tokens.dat > asm/tokhash.c 2222 vectors, trying n = 2048... 1: Collision: 239,1648: cmpunordps with vpsubusb 2: Graph is cyclic 3: Collision: 565,2334: fucomp with vfmsub123ss 4: Graph is cyclic 5: Graph is cyclic 6: Graph is cyclic 7: Done: n = 2048, sv = [0xace2d0e4, 0x80575791] gcc -std=gnu99 -c -g -O2 -fwrapv -W -Wall -std=c99 -pedantic -Wno-long-long -Werror=implicit -Werror=missing-braces -Werror=return-type -Werror=trigraphs -Werror=pointer-arith -Werror=missing-prototypes -Werror=missing-declarations -Werror=comment -Werror=vla -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I./x86 -I./x86 -I./asm -I./asm -I./disasm -I./disasm -I./output -I./output -o asm/tokhash.o asm/tokhash.c asm/tokhash.c: In function 'nasm_token_hash': asm/tokhash.c:4349:46: error: 'I_MONITORX' undeclared (first use in this function) { "monitorx", TOKEN_INSN, C_none, 0, I_MONITORX }, ^ asm/tokhash.c:4349:46: note: each undeclared identifier is reported only once for each function it appears in asm/tokhash.c:4349:9: warning: missing initializer for field 'num' of 'const struct tokendata' [-Wmissing-field-initializers] { "monitorx", TOKEN_INSN, C_none, 0, I_MONITORX }, ^ asm/tokhash.c:18:13: note: 'num' declared here int32_t num; ^ asm/tokhash.c:4362:44: error: 'I_MWAITX' undeclared (first use in this function) { "mwaitx", TOKEN_INSN, C_none, 0, I_MWAITX }, ^ asm/tokhash.c:4362:9: warning: missing initializer for field 'num' of 'const struct tokendata' [-Wmissing-field-initializers] { "mwaitx", TOKEN_INSN, C_none, 0, I_MWAITX }, ^ asm/tokhash.c:18:13: note: 'num' declared here int32_t num; ^ asm/tokhash.c:5964:44: error: 'I_RDPKRU' undeclared (first use in this function) { "rdpkru", TOKEN_INSN, C_none, 0, I_RDPKRU }, ^ asm/tokhash.c:5964:9: warning: missing initializer for field 'num' of 'const struct tokendata' [-Wmissing-field-initializers] { "rdpkru", TOKEN_INSN, C_none, 0, I_RDPKRU }, ^ asm/tokhash.c:18:13: note: 'num' declared here int32_t num; ^ asm/tokhash.c:5965:44: error: 'I_WRPKRU' undeclared (first use in this function) { "wrpkru", TOKEN_INSN, C_none, 0, I_WRPKRU }, ^ asm/tokhash.c:5965:9: warning: missing initializer for field 'num' of 'const struct tokendata' [-Wmissing-field-initializers] { "wrpkru", TOKEN_INSN, C_none, 0, I_WRPKRU }, ^ asm/tokhash.c:18:13: note: 'num' declared here int32_t num; ^ asm/tokhash.c:5967:44: error: 'I_CLZERO' undeclared (first use in this function) { "clzero", TOKEN_INSN, C_none, 0, I_CLZERO }, ^ asm/tokhash.c:5967:9: warning: missing initializer for field 'num' of 'const struct tokendata' [-Wmissing-field-initializers] { "clzero", TOKEN_INSN, C_none, 0, I_CLZERO }, ^ asm/tokhash.c:18:13: note: 'num' declared here int32_t num; ^ make: *** [asm/tokhash.o] Error 1 Dave |
From: anonymous c. <nas...@us...> - 2016-08-02 00:12:19
|
> What happens if you run "make alldeps" before making? tl;dr = it does make the otherwise missing files, i.e. I don't have to manually make them, but the final build/link is still failing with the same no/undefined symbol error messages make spotless sh autogen.sh sh configure make alldeps make [...] rm -f libnasm.a ar cq libnasm.a stdlib/snprintf.o stdlib/vsnprintf.o stdlib/strlcpy.o stdlib/strnlen.o nasmlib/ver.o nasmlib/crc64.o nasmlib/malloc.o nasmlib/error.o nasmlib/md5c.o nasmlib/string.o nasmlib/file.o nasmlib/ilog2.o nasmlib/realpath.o nasmlib/filename.o nasmlib/srcfile.o nasmlib/zerobuf.o nasmlib/readnum.o nasmlib/bsi.o nasmlib/rbtree.o nasmlib/hashtbl.o nasmlib/raa.o nasmlib/saa.o common/common.o x86/insnsa.o x86/insnsb.o x86/insnsd.o x86/insnsn.o x86/regs.o x86/regvals.o x86/regflags.o x86/regdis.o x86/disp8.o x86/iflag.o /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(snprintf.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(vsnprintf.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(strlcpy.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(strnlen.o) has no symbols ranlib libnasm.a /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(snprintf.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(vsnprintf.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(strlcpy.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnasm.a(strnlen.o) has no symbols gcc -o nasm asm/nasm.o asm/float.o asm/directiv.o asm/assemble.o asm/labels.o asm/parser.o asm/preproc.o asm/quote.o asm/pptok.o asm/listing.o asm/eval.o asm/exprlib.o asm/stdscan.o asm/strfunc.o asm/tokhash.o asm/segalloc.o asm/preproc-nop.o asm/rdstrnum.o macros/macros.o output/outform.o output/outlib.o output/nulldbg.o output/nullout.o output/outbin.o output/outaout.o output/outcoff.o output/outelf.o output/outobj.o output/outas86.o output/outrdf2.o output/outdbg.o output/outieee.o output/outmacho.o output/codeview.o libnasm.a Undefined symbols for architecture x86_64: "_zero_buffer", referenced from: _assemble in assemble.o _out in assemble.o _macho32_init in outmacho.o _macho64_init in outmacho.o _fwritezero in libnasm.a(file.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [nasm] Error 1 I'll look into it some more tomorrow. |
From: H. P. A. <hp...@zy...> - 2016-08-02 00:40:11
|
On August 1, 2016 5:12:12 PM PDT, anonymous coward <nas...@us...> wrote: >> What happens if you run "make alldeps" before making? > >tl;dr = it does make the otherwise missing files, i.e. I don't >have to manually make them, but the final build/link is still >failing with the same no/undefined symbol error messages > >make spotless >sh autogen.sh >sh configure >make alldeps >make > >[...] > >rm -f libnasm.a > >ar cq libnasm.a stdlib/snprintf.o stdlib/vsnprintf.o stdlib/strlcpy.o >stdlib/strnlen.o nasmlib/ver.o nasmlib/crc64.o nasmlib/malloc.o >nasmlib/error.o nasmlib/md5c.o nasmlib/string.o nasmlib/file.o >nasmlib/ilog2.o nasmlib/realpath.o nasmlib/filename.o >nasmlib/srcfile.o nasmlib/zerobuf.o nasmlib/readnum.o nasmlib/bsi.o >nasmlib/rbtree.o nasmlib/hashtbl.o nasmlib/raa.o nasmlib/saa.o >common/common.o x86/insnsa.o x86/insnsb.o x86/insnsd.o x86/insnsn.o >x86/regs.o x86/regvals.o x86/regflags.o x86/regdis.o x86/disp8.o >x86/iflag.o >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(snprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(vsnprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strlcpy.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strnlen.o) has no symbols > >ranlib libnasm.a >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(snprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(vsnprintf.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strlcpy.o) has no symbols >/Library/Developer/CommandLineTools/usr/bin/ranlib: file: >libnasm.a(strnlen.o) has no symbols > >gcc -o nasm asm/nasm.o asm/float.o asm/directiv.o asm/assemble.o >asm/labels.o asm/parser.o asm/preproc.o asm/quote.o asm/pptok.o >asm/listing.o asm/eval.o asm/exprlib.o asm/stdscan.o asm/strfunc.o >asm/tokhash.o asm/segalloc.o asm/preproc-nop.o asm/rdstrnum.o >macros/macros.o output/outform.o output/outlib.o output/nulldbg.o >output/nullout.o output/outbin.o output/outaout.o output/outcoff.o >output/outelf.o output/outobj.o output/outas86.o output/outrdf2.o >output/outdbg.o output/outieee.o output/outmacho.o output/codeview.o >libnasm.a >Undefined symbols for architecture x86_64: > "_zero_buffer", referenced from: > _assemble in assemble.o > _out in assemble.o > _macho32_init in outmacho.o > _macho64_init in outmacho.o > _fwritezero in libnasm.a(file.o) >ld: symbol(s) not found for architecture x86_64 >clang: error: linker command failed with exit code 1 (use -v to see >invocation) >make: *** [nasm] Error 1 > >I'll look into it some more tomorrow. zero_buffer is defined in nasmlib/zerolib.c -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting. |
From: anonymous c. <nas...@us...> - 2016-08-02 13:55:02
|
>> I'll look into it some more tomorrow. > zero_buffer is defined in nasmlib/zerolib.c zerobuf.o definitely gets picked up for nasmlib.a... ar cq libnasm.a stdlib/snprintf.o stdlib/vsnprintf.o stdlib/strlcpy.o stdlib/strnlen.o nasmlib/ver.o nasmlib/crc64.o nasmlib/malloc.o nasmlib/error.o nasmlib/md5c.o nasmlib/string.o nasmlib/file.o nasmlib/ilog2.o nasmlib/realpath.o nasmlib/filename.o nasmlib/srcfile.o nasmlib/zerobuf.o nasmlib/readnum.o nasmlib/bsi.o nasmlib/rbtree.o nasmlib/hashtbl.o nasmlib/raa.o nasmlib/saa.o common/common.o x86/insnsa.o x86/insnsb.o x86/insnsd.o x86/insnsn.o x86/regs.o x86/regvals.o x86/regflags.o x86/regdis.o x86/disp8.o x86/iflag.o nm libnasm.a | grep _zero_buffer U _zero_buffer 0000000000001000 C _zero_buffer -- but when nasmlib.a gets picked up for nasm, somehow _zero_buffer isn't found: gcc -o nasm asm/nasm.o asm/float.o asm/directiv.o asm/assemble.o asm/labels.o asm/parser.o asm/preproc.o asm/quote.o asm/pptok.o asm/listing.o asm/eval.o asm/exprlib.o asm/stdscan.o asm/strfunc.o asm/tokhash.o asm/segalloc.o asm/preproc-nop.o asm/rdstrnum.o macros/macros.o output/outform.o output/outlib.o output/nulldbg.o output/nullout.o output/outbin.o output/outaout.o output/outcoff.o output/outelf.o output/outobj.o output/outas86.o output/outrdf2.o output/outdbg.o output/outieee.o output/outmacho.o output/codeview.o libnasm.a Undefined symbols for architecture x86_64: "_zero_buffer", referenced from: _assemble in assemble.o _out in assemble.o _macho32_init in outmacho.o _macho64_init in outmacho.o _fwritezero in libnasm.a(file.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [nasm] Error 1 -- when I explicitly add nasmlib/zerobuf.o for nasm, things do succeed: gcc -o nasm asm/nasm.o asm/float.o asm/directiv.o asm/assemble.o asm/labels.o asm/parser.o asm/preproc.o asm/quote.o asm/pptok.o asm/listing.o asm/eval.o asm/exprlib.o asm/stdscan.o asm/strfunc.o asm/tokhash.o asm/segalloc.o asm/preproc-nop.o asm/rdstrnum.o macros/macros.o output/outform.o output/outlib.o output/nulldbg.o output/nullout.o output/outbin.o output/outaout.o output/outcoff.o output/outelf.o output/outobj.o output/outas86.o output/outrdf2.o output/outdbg.o output/outieee.o output/outmacho.o output/codeview.o nasmlib/zerobuf.o libnasm.a ./nasm -v NASM version 2.13rc0 compiled on Aug 2 2016 -- I'm not sure what to try next -- nasmlib.a seems to contain the symbol, but somehow ld fails? |
From: H. P. A. <hp...@zy...> - 2016-08-02 14:22:11
|
On August 2, 2016 6:54:54 AM PDT, anonymous coward <nas...@us...> wrote: >>> I'll look into it some more tomorrow. >> zero_buffer is defined in nasmlib/zerolib.c > >zerobuf.o definitely gets picked up for nasmlib.a... > >ar cq libnasm.a stdlib/snprintf.o stdlib/vsnprintf.o stdlib/strlcpy.o >stdlib/strnlen.o nasmlib/ver.o nasmlib/crc64.o nasmlib/malloc.o >nasmlib/error.o nasmlib/md5c.o nasmlib/string.o nasmlib/file.o >nasmlib/ilog2.o nasmlib/realpath.o nasmlib/filename.o >nasmlib/srcfile.o nasmlib/zerobuf.o nasmlib/readnum.o nasmlib/bsi.o >nasmlib/rbtree.o nasmlib/hashtbl.o nasmlib/raa.o nasmlib/saa.o >common/common.o x86/insnsa.o x86/insnsb.o x86/insnsd.o x86/insnsn.o >x86/regs.o x86/regvals.o x86/regflags.o x86/regdis.o x86/disp8.o >x86/iflag.o > >nm libnasm.a | grep _zero_buffer > U _zero_buffer >0000000000001000 C _zero_buffer > >-- > >but when nasmlib.a gets picked up for nasm, somehow _zero_buffer isn't >found: > >gcc -o nasm asm/nasm.o asm/float.o asm/directiv.o asm/assemble.o >asm/labels.o asm/parser.o asm/preproc.o asm/quote.o asm/pptok.o >asm/listing.o asm/eval.o asm/exprlib.o asm/stdscan.o asm/strfunc.o >asm/tokhash.o asm/segalloc.o asm/preproc-nop.o asm/rdstrnum.o >macros/macros.o output/outform.o output/outlib.o output/nulldbg.o >output/nullout.o output/outbin.o output/outaout.o output/outcoff.o >output/outelf.o output/outobj.o output/outas86.o output/outrdf2.o >output/outdbg.o output/outieee.o output/outmacho.o output/codeview.o >libnasm.a >Undefined symbols for architecture x86_64: > "_zero_buffer", referenced from: > _assemble in assemble.o > _out in assemble.o > _macho32_init in outmacho.o > _macho64_init in outmacho.o > _fwritezero in libnasm.a(file.o) >ld: symbol(s) not found for architecture x86_64 >clang: error: linker command failed with exit code 1 (use -v to see >invocation) >make: *** [nasm] Error 1 > >-- > >when I explicitly add nasmlib/zerobuf.o for nasm, things do succeed: > >gcc -o nasm asm/nasm.o asm/float.o asm/directiv.o asm/assemble.o >asm/labels.o asm/parser.o asm/preproc.o asm/quote.o asm/pptok.o >asm/listing.o asm/eval.o asm/exprlib.o asm/stdscan.o asm/strfunc.o >asm/tokhash.o asm/segalloc.o asm/preproc-nop.o asm/rdstrnum.o >macros/macros.o output/outform.o output/outlib.o output/nulldbg.o >output/nullout.o output/outbin.o output/outaout.o output/outcoff.o >output/outelf.o output/outobj.o output/outas86.o output/outrdf2.o >output/outdbg.o output/outieee.o output/outmacho.o output/codeview.o >nasmlib/zerobuf.o libnasm.a > >./nasm -v >NASM version 2.13rc0 compiled on Aug 2 2016 > >-- > >I'm not sure what to try next -- nasmlib.a seems to contain the >symbol, but somehow ld fails? Ugh. This would seem to be an OSX linker bug :( -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting. |
From: Cyrill G. <gor...@gm...> - 2016-08-02 14:24:07
|
On Tue, Aug 02, 2016 at 06:54:54AM -0700, anonymous coward wrote: > > I'm not sure what to try next -- nasmlib.a seems to contain the > symbol, but somehow ld fails? I think --whole-archive option needed for ld |
From: H. P. A. <hp...@zy...> - 2016-08-02 16:34:30
|
On 08/02/16 06:54, anonymous coward wrote: >>> I'll look into it some more tomorrow. >> zero_buffer is defined in nasmlib/zerolib.c > > zerobuf.o definitely gets picked up for nasmlib.a... > OK, I just checked in a (hopefully) workaround for this. -hpa |
From: anonymous c. <nas...@us...> - 2016-08-02 16:52:40
|
> OK, I just checked in a (hopefully) workaround for this. works -- thanks |