[Bug-apl] Compile error in src/Performance.cc (WIP port of GNU APL 1.8 to OpenBSD)
Dear list, I have attempted to compile GNU APL 1.8 under OpenBSD. I have merged some changes to the source from the OpenBSD port of GNU APL 1.7. However I get a compile error during the build process when compiling src/Performance.cc. I have inserted an excerpt from the build log at the end of this message. It seems that the identifier _B is already defined, presumably by a system header. Please advise what to do next. Thank you in advance for your help. Environment: OS: OpenBSD 6.5/amd64 Hardware: amd64 Compiler versions: Script started on Thu Jul 18 21:43:32 2019 gpdpocket$ clang --version OpenBSD clang version 7.0.1 (tags/RELEASE_701/final) (based on LLVM 7.0.1) Target: amd64-unknown-openbsd6.5 Thread model: posix InstalledDir: /usr/bin gpdpocket$ clang++ --version OpenBSD clang version 7.0.1 (tags/RELEASE_701/final) (based on LLVM 7.0.1) Target: amd64-unknown-openbsd6.5 Thread model: posix InstalledDir: /usr/bin gpdpocket$ uname -a OpenBSD gpdpocket.my.domain 6.5 GENERIC.MP#1 amd64 gpdpocket$ ^D Script done on Thu Jul 18 21:44:27 2019 Configure arguments: ./configure --prefix=/home/alexshendi/.local/apl-1.8/ \ --without-gtk3 --without-sqlite3 --without-postgresql \ --without-pcre CC=clang CXX=clang++ CXX_WERROR=no \ LIBS=-lexecinfo LDFLAGS=-L/usr/local/lib -L/usr/X11R6/lib \ -R/usr/local/lib -R/usr/X11R6/lib Build Log: [...] clang++ -DHAVE_CONFIG_H -I. -I.. -Wall -I sql -g -MT apl-Performance.o -MD -MP -MF .deps/apl-Performance.Tpo -c -o apl-Performance.o `test -f 'Performance.cc' || echo './'`Performance.cc In file included from Performance.cc:232: ./Performance.def:45:1: error: use of undeclared identifier 'fs_SCALAR0x80' perfo_4(SCALAR , _B, " scalar B", 888ULL) ^ Performance.cc:230:36: note: expanded from macro 'perfo_4' #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr) ^ Performance.cc:228:38: note: expanded from macro 'perfo_3' #define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out); ^ :252:1: note: expanded from here fs_SCALAR0x80 ^ In file included from Performance.cc:232: ./Performance.def:47:1: error: use of undeclared identifier 'fs_clone0x80'; did you mean 'fs_clone_B'? perfo_4(clone , _B, "clone B", 888ULL) ^ Performance.cc:230:36: note: expanded from macro 'perfo_4' #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr) ^ Performance.cc:228:38: note: expanded from macro 'perfo_3' #define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out); ^ :256:1: note: expanded from here fs_clone0x80 ^ ./Performance.def:47:1: note: 'fs_clone_B' declared here perfo_4(clone , _B, "clone B", 888ULL) ^ Performance.cc:44:36: note: expanded from macro 'perfo_4' FunctionStatistics Performance::fs_ ## id ## ab (PFS_ ## id ## ab); ^ :101:1: note: expanded from here fs_clone_B ^ In file included from Performance.cc:232: ./Performance.def:51:1: error: use of undeclared identifier 'fs_PrintBuffer0x80' perfo_4(PrintBuffer , _B, "PrintBuffer(B)", -1) ^ Performance.cc:230:36: note: expanded from macro 'perfo_4' #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr) ^ Performance.cc:228:38: note: expanded from macro 'perfo_3' #define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out); ^ :2:1: note: expanded from here fs_PrintBuffer0x80 ^ In file included from Performance.cc:232: ./Performance.def:52:1: error: use of undeclared identifier 'fs_PrintBuffer10x80'; did you mean 'fs_PrintBuffer1_B'? perfo_4(PrintBuffer1 , _B, "PrintBuffer1 ", -1) ^ Performance.cc:230:36: note: expanded from macro 'perfo_4' #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr) ^ Performance.cc:228:38: note: expanded from macro 'perfo_3' #define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out); ^ :4:1: note: expanded from here fs_PrintBuffer10x80 ^ ./Performance.def:52:1: note: 'fs_PrintBuffer1_B' declared here perfo_4(PrintBuffer1 , _B, "PrintBuffer1 ", -1) ^ Performance.cc:44:36: note: expanded from macro 'perfo_4' FunctionStatistics Performance::fs_ ## id ## ab (PFS_ ## id ## ab); ^ :121:1: note: expanded from here fs_PrintBuffer1_B ^ In file included from Performance.cc:232: ./Performance.def:53:1: error: use of undeclared identifier 'fs_PrintBuffer20x80'; did you mean 'fs_PrintBuffer2_B'? perfo_4(PrintBuffer2 , _B, "PrintBuffer2 ", -1) ^ Performance.cc:230:36: note: expanded from macro 'perfo_4' #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr) ^ Performance.cc:228:38: note: expanded from macro 'perfo_3' #define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out); ^ :6:1: note: expanded from here fs_PrintBuffer20x80 ^ ./Performance.def:53:1: note: 'fs_PrintBuffer2_B' declared here perfo_4(PrintBuffer2 , _B, "PrintBuffer2 ", -1) ^ Performance.cc:44:36: note: expanded from macro 'perfo_4' FunctionStatistics Performance::fs_ ## id ## ab (PFS_ ## id ## ab); ^ :125:1: note: expanded from here fs_PrintBuffer2_B ^ In file included from Performance.cc:232: ./Performance.def:54:1: error: use of undeclared identifi
[Bug-apl] Compile error in src/Performance.cc (WIP Port of GNU APL 1.8 to OpenBSD)
Dear list, I have attempted to compile GNU APL 1.8 under OpenBSD. I have merged some changes to the source from the OpenBSD port of GNU APL 1.7. However I get a compile error during the build process when compiling src/Performance.cc. I have inserted an excerpt from the build log at the end of this message. It seems that the identifier _B is already defined, presumably by a system header. Please advise what to do next. Thank you in advance for your help. Environment: OS: OpenBSD 6.5/amd64 Hardware: amd64 Compiler versions: Script started on Thu Jul 18 21:43:32 2019 gpdpocket$ clang --version OpenBSD clang version 7.0.1 (tags/RELEASE_701/final) (based on LLVM 7.0.1) Target: amd64-unknown-openbsd6.5 Thread model: posix InstalledDir: /usr/bin gpdpocket$ clang++ --version OpenBSD clang version 7.0.1 (tags/RELEASE_701/final) (based on LLVM 7.0.1) Target: amd64-unknown-openbsd6.5 Thread model: posix InstalledDir: /usr/bin gpdpocket$ uname -a OpenBSD gpdpocket.my.domain 6.5 GENERIC.MP#1 amd64 gpdpocket$ ^D Script done on Thu Jul 18 21:44:27 2019 Configure arguments: ./configure --prefix=/home/alexshendi/.local/apl-1.8/ \ --without-gtk3 --without-sqlite3 --without-postgresql \ --without-pcre CC=clang CXX=clang++ CXX_WERROR=no \ LIBS=-lexecinfo LDFLAGS=-L/usr/local/lib -L/usr/X11R6/lib \ -R/usr/local/lib -R/usr/X11R6/lib Build Log: [...] clang++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -g -MT apl-Performance.o -MD -MP -MF .deps/apl-Performance.Tpo -c -o apl-Performance.o `test -f 'Performance.cc' || echo './'`Performance.cc In file included from Performance.cc:232: ./Performance.def:45:1: error: use of undeclared identifier 'fs_SCALAR0x80' perfo_4(SCALAR , _B, " scalar B", 888ULL) ^ Performance.cc:230:36: note: expanded from macro 'perfo_4' #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr) ^ Performance.cc:228:38: note: expanded from macro 'perfo_3' #define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out); ^ :252:1: note: expanded from here fs_SCALAR0x80 ^ In file included from Performance.cc:232: ./Performance.def:47:1: error: use of undeclared identifier 'fs_clone0x80'; did you mean 'fs_clone_B'? perfo_4(clone , _B, "clone B",888ULL) ^ Performance.cc:230:36: note: expanded from macro 'perfo_4' #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr) ^ Performance.cc:228:38: note: expanded from macro 'perfo_3' #define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out); ^ :256:1: note: expanded from here fs_clone0x80 ^ ./Performance.def:47:1: note: 'fs_clone_B' declared here perfo_4(clone , _B, "clone B",888ULL) ^ Performance.cc:44:36: note: expanded from macro 'perfo_4' FunctionStatistics Performance::fs_ ## id ## ab (PFS_ ## id ## ab); ^ :101:1: note: expanded from here fs_clone_B ^ In file included from Performance.cc:232: ./Performance.def:51:1: error: use of undeclared identifier 'fs_PrintBuffer0x80' perfo_4(PrintBuffer, _B, "PrintBuffer(B)", -1) ^ Performance.cc:230:36: note: expanded from macro 'perfo_4' #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr) ^ Performance.cc:228:38: note: expanded from macro 'perfo_3' #define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out); ^ :2:1: note: expanded from here fs_PrintBuffer0x80 ^ In file included from Performance.cc:232: ./Performance.def:52:1: error: use of undeclared identifier 'fs_PrintBuffer10x80'; did you mean 'fs_PrintBuffer1_B'? perfo_4(PrintBuffer1 , _B, "PrintBuffer1 ", -1) ^ Performance.cc:230:36: note: expanded from macro 'perfo_4' #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr) ^ Performance.cc:228:38: note: expanded from macro 'perfo_3' #define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out); ^ :4:1: note: expanded from here fs_PrintBuffer10x80 ^ ./Performance.def:52:1: note: 'fs_PrintBuffer1_B' declared here perfo_4(PrintBuffer1 , _B, "PrintBuffer1 ", -1) ^ Performance.cc:44:36: note: expanded from macro 'perfo_4' FunctionStatistics Performance::fs_ ## id ## ab (PFS_ ## id ## ab); ^ :121:1: note: expanded from here fs_PrintBuffer1_B ^ In file included from Performance.cc:232: ./Performance.def:53:1: error: use of undeclared identifier 'fs_PrintBuffer20x80'; did you mean 'fs_PrintBuffer2_B'? perfo_4(PrintBuffer2 , _B, "PrintBuffer2 ", -1) ^ Performance.cc:230:36: note: expanded from macro 'perfo_4' #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr) ^ Performance.cc:228:38: note: expanded from macro 'perfo_3' #define perfo_3(id, ab, _nam
Re: [Bug-apl] Compile error in src/Performance.cc (WIP port of GNU APL 1.8 to OpenBSD)
I don't have the source code in front of me, so I can't check myself right now but GNU APL shouldn't be declaring a symbol starting with _ since such names are reserved. If it does, I believe the solution is to change them. Regards, Elias On Fri, 19 Jul 2019, 06:35 Alexander Shendi (Web.DE), < alexander.she...@web.de> wrote: > Dear list, > > I have attempted to compile GNU APL 1.8 under OpenBSD. > I have merged some changes to > the source from the OpenBSD port of GNU > APL 1.7. > > However I get a compile error during the build process when > compiling src/Performance.cc. I have inserted an excerpt from the build > log at the end of this message. It seems that the identifier _B is > already defined, presumably by a system header. Please advise > what to do next. > > Thank you in advance for your help. > > Environment: > > OS: OpenBSD 6.5/amd64 > Hardware: amd64 > > Compiler versions: > Script started on Thu Jul 18 21:43:32 2019 > gpdpocket$ clang --version > OpenBSD clang version 7.0.1 (tags/RELEASE_701/final) (based on LLVM 7.0.1) > Target: amd64-unknown-openbsd6.5 > Thread model: posix > InstalledDir: /usr/bin > gpdpocket$ clang++ --version > OpenBSD clang version 7.0.1 (tags/RELEASE_701/final) (based on LLVM 7.0.1) > Target: amd64-unknown-openbsd6.5 > Thread model: posix > InstalledDir: /usr/bin > gpdpocket$ uname -a > OpenBSD gpdpocket.my.domain 6.5 GENERIC.MP#1 amd64 > gpdpocket$ ^D > > Script done on Thu Jul 18 21:44:27 2019 > > Configure arguments: > ./configure --prefix=/home/alexshendi/.local/apl-1.8/ \ > --without-gtk3 --without-sqlite3 --without-postgresql \ > --without-pcre CC=clang CXX=clang++ CXX_WERROR=no \ > LIBS=-lexecinfo LDFLAGS=-L/usr/local/lib -L/usr/X11R6/lib \ > -R/usr/local/lib -R/usr/X11R6/lib > > Build Log: > [...] > > clang++ -DHAVE_CONFIG_H -I. -I.. -Wall -I sql -g -MT apl-Performance.o -MD > -MP -MF .deps/apl-Performance.Tpo -c -o apl-Performance.o `test -f > 'Performance.cc' || echo './'`Performance.cc > In file included from Performance.cc:232: > ./Performance.def:45:1: error: use of undeclared identifier 'fs_SCALAR0x80' > perfo_4(SCALAR , _B, " scalar B", 888ULL) > ^ > Performance.cc:230:36: note: expanded from macro 'perfo_4' > #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr) > ^ > Performance.cc:228:38: note: expanded from macro 'perfo_3' > #define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out); > ^ > :252:1: note: expanded from here > fs_SCALAR0x80 > ^ > In file included from Performance.cc:232: > ./Performance.def:47:1: error: use of undeclared identifier > 'fs_clone0x80'; did > you mean 'fs_clone_B'? > perfo_4(clone , _B, "clone B", 888ULL) > ^ > Performance.cc:230:36: note: expanded from macro 'perfo_4' > #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr) > ^ > Performance.cc:228:38: note: expanded from macro 'perfo_3' > #define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out); > ^ > :256:1: note: expanded from here > fs_clone0x80 > ^ > ./Performance.def:47:1: note: 'fs_clone_B' declared here > perfo_4(clone , _B, "clone B", 888ULL) > ^ > Performance.cc:44:36: note: expanded from macro 'perfo_4' > FunctionStatistics Performance::fs_ ## id ## ab (PFS_ ## id ## ab); > ^ > :101:1: note: expanded from here > fs_clone_B > ^ > In file included from Performance.cc:232: > ./Performance.def:51:1: error: use of undeclared identifier > 'fs_PrintBuffer0x80' > perfo_4(PrintBuffer , _B, "PrintBuffer(B)", -1) > ^ > Performance.cc:230:36: note: expanded from macro 'perfo_4' > #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr) > ^ > Performance.cc:228:38: note: expanded from macro 'perfo_3' > #define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out); > ^ > :2:1: note: expanded from here > fs_PrintBuffer0x80 > ^ > In file included from Performance.cc:232: > ./Performance.def:52:1: error: use of undeclared identifier > 'fs_PrintBuffer10x80'; did you mean 'fs_PrintBuffer1_B'? > perfo_4(PrintBuffer1 , _B, "PrintBuffer1 ", -1) > ^ > Performance.cc:230:36: note: expanded from macro 'perfo_4' > #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr) > ^ > Performance.cc:228:38: note: expanded from macro 'perfo_3' > #define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out); > ^ > :4:1: note: expanded from here > fs_PrintBuffer10x80 > ^ > ./Performance.def:52:1: note: 'fs_PrintBuffer1_B' declared here > perfo_4(PrintBuffer1 , _B, "PrintBuffer1 ", -1) > ^ > Performance.cc:44:36: note: expanded from macro 'perfo_4' > FunctionStatistics Performance::fs_ ## id ## ab (PFS_ ## id ## ab); > ^ > :121:1: note: expanded from here > fs_PrintBuffer1_B > ^ > In file included from Performance.cc:232: > ./Performance.def:53:1: error: use of undeclared identifier > 'fs_PrintBuffer20x80'; did you mean 'fs_PrintBuffer2_B'? > perfo_4(PrintBuffer2 , _B, "PrintBuffer2 ", -1) > ^ > Performance.cc:230:36: note: expanded from macro 'perfo_4' > #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name,