Skip to content
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

Build the tool in different environments #2

Open
Kazzz-S opened this issue Dec 20, 2023 · 4 comments
Open

Build the tool in different environments #2

Kazzz-S opened this issue Dec 20, 2023 · 4 comments

Comments

@Kazzz-S
Copy link

Kazzz-S commented Dec 20, 2023

1. Linux: Mint 20

MyHost{sekigawa}(1)$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the sourc

MyHost{sekigawa}(2)$ make
gcc -o dump_oas.o -c dump_oas.cc  -O3
In file included from tlStream.h:29,
                 from dbOASISDumper.h:28,
                 from dump_oas.cc:23:
tlString.h:695:64: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
  695 | KLAYOUT_DLL void from_string (const std::string &s, double &v) throw (tl::Exception);
      |                                                                ^~~~~
:
:
:
g++ -o dump_gds2 dump_gds2.o dbOASISDumper.o dbGDS2Dumper.o tlStream.o tlVariant.o \
       tlException.o tlString.o tlDeflate.o tlAssert.o -lstdc++ -lz

MyHost{sekigawa}(3)$ ll -rt
:
:
368 -rwxrwxr-x 1 sekigawa sekigawa 375160 Dec 20 09:18 dump_oas*  <===
368 -rwxrwxr-x 1 sekigawa sekigawa 375160 Dec 20 09:18 dump_gds2  <===
MyHost{sekigawa}(4)$ ./dump_oas -h
dump_oas - An OASIS file disassembly tool

Usage: dump_oas [options] [OASIS file]

Options:
  -n <width>     number of bytes to print per line
  -s             short: abbreviate hex dump with more than "width" bytes

Version 0.2

Author: Matthias Köfferlein, 2013
Distributed under GPL V2 or later
MyHost{sekigawa}(5)$ ./dump_gds2 -h
dump_gds2 - An GDS2 file disassembly tool

Usage: dump_gds2 [options] [GDS2 file]

Options:
  -n <width>     number of bytes to print per line
  -s             short: abbreviate hex dump with more than "width" bytes

Version 0.1

Author: Matthias Köfferlein, 2013
Distributed under GPL V2 or later
@Kazzz-S
Copy link
Author

Kazzz-S commented Dec 20, 2023

2. MINGW64

$ gcc --version
gcc.exe (Rev2, Built by MSYS2 project) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make
gcc -o dump_oas.o -c dump_oas.cc  -O3
In file included from tlStream.h:29,
                 from dbOASISDumper.h:28,
                 from dump_oas.cc:23:
tlString.h:695:64: error: ISO C++17 does not allow dynamic exception specifications
  695 | KLAYOUT_DLL void from_string (const std::string &s, double &v) throw (tl::Exception);
      |                                                                ^~~~~
:
:
:
ingw32-make: *** [Makefile:20: dump_oas.o] Error 1

@Kazzz-S
Copy link
Author

Kazzz-S commented Dec 20, 2023

3A. macOS Monterey

MacBookPro2{sekigawa} dump_oas_gds2 (1)% gcc --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin


MacBookPro2{sekigawa} dump_oas_gds2 (2)% make
gcc -o dump_oas.o -c dump_oas.cc  -O3
gcc -o dbOASISDumper.o -c dbOASISDumper.cc  -O3
gcc -o dbGDS2Dumper.o -c dbGDS2Dumper.cc  -O3
:
:
:
2 warnings generated.
gcc -o tlDeflate.o -c tlDeflate.cc  -O3
gcc -o tlAssert.o -c tlAssert.cc  -O3
g++ -o dump_oas dump_oas.o dbOASISDumper.o dbGDS2Dumper.o tlStream.o tlVariant.o tlException.o \
       tlString.o tlDeflate.o tlAssert.o -lstdc++ -lz
gcc -o dump_gds2.o -c dump_gds2.cc  -O3
g++ -o dump_gds2 dump_gds2.o dbOASISDumper.o dbGDS2Dumper.o tlStream.o tlVariant.o tlException.o \
       tlString.o tlDeflate.o tlAssert.o -lstdc++ -lz


MacBookPro2{sekigawa} dump_oas_gds2 (3)% ll -rt
:
:
:
-rwxr-xr-x  1 sekigawa staff 278896 12 20 13:01 dump_oas
-rwxr-xr-x  1 sekigawa staff 278896 12 20 13:01 dump_gds2
MacBookPro2{sekigawa} dump_oas_gds2 (4)% ./dump_oas -h
dump_oas - An OASIS file disassembly tool

Usage: dump_oas [options] [OASIS file]

Options:
  -n <width>     number of bytes to print per line
  -s             short: abbreviate hex dump with more than "width" bytes

Version 0.2

Author: Matthias Köfferlein, 2013
Distributed under GPL V2 or later
MacBookPro2{sekigawa} dump_oas_gds2 (5)% ./dump_gds2 -h
dump_gds2 - An GDS2 file disassembly tool

Usage: dump_gds2 [options] [GDS2 file]

Options:
  -n <width>     number of bytes to print per line
  -s             short: abbreviate hex dump with more than "width" bytes

Version 0.1

Author: Matthias Köfferlein, 2013
Distributed under GPL V2 or later
MacBookPro2{sekigawa} dump_oas_gds2 (6)% otool -L dump_oas
dump_oas:
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
MacBookPro2{sekigawa} dump_oas_gds2 (7)% otool -L dump_gds2
dump_gds2:
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)

@Kazzz-S
Copy link
Author

Kazzz-S commented Dec 20, 2023

3B. macOS Monterey

Dump example of t10.gds in the testdata/gds/ directory

000000000   00 06 00 02              HEADER
000000004   02 58                      600
000000006   00 1c 01 02              BGNLIB
000000010   07 e0 00 0a 00 1c 00 17    2016-10-28 23:42:45
000000018 + 00 2a 00 2d 
000000022   07 e0 00 0a 00 1c 00 17    2016-10-28 23:42:45
000000030 + 00 2a 00 2d 
000000034   00 08 02 06              LIBNAME
000000038   4c 49 42 00                "LIB"
000000042   00 14 03 05              UNITS
000000046   3e 41 89 37 4b c6 a7 f0    0.001
000000054   39 44 b8 2f a0 9b 5a 54    1e-09
000000062   00 1c 05 02              BGNSTR
000000066   07 e0 00 0a 00 1c 00 17    2016-10-28 23:42:45
000000074 + 00 2a 00 2d 
000000078   07 e0 00 0a 00 1c 00 17    2016-10-28 23:42:45
000000086 + 00 2a 00 2d 
000000090   00 0a 06 06              STRNAME
000000094   54 52 41 4e 53 00          "TRANS"
000000100   00 04 08 00              BOUNDARY
000000104   00 06 0d 02              LAYER
000000108   00 02                      2
000000110   00 06 0e 02              DATATYPE
000000114   00 00                      0
000000116   00 2c 10 03              XY
000000120   ff ff fd 76 ff ff fe 25    -650,-475
000000128   ff ff fd 76 00 00 01 db    -650,475
000000136   00 00 02 8a 00 00 01 db    650,475
000000144   00 00 02 8a ff ff fe 25    650,-475
000000152   ff ff fd 76 ff ff fe 25    -650,-475
000000160   00 04 11 00              ENDEL
:
: 
: 
000002734   00 00 00 00 00 00 0a f0    0,2800
000002742   00 08 19 06              STRING
000002746   56 44 44 00                "VDD"
000002750   00 04 11 00              ENDEL
000002754   00 04 07 00              ENDSTR
000002758   00 04 04 00              ENDLIB

@stan3c
Copy link

stan3c commented Jan 30, 2024

If anyone has a problem compiling this tool and gets an error like " error: ISO C++17 does not allow dynamic exception specifications", the workaround is to edit Makefile and add "-std=c++14" option after every gcc or g++.
The program will compile now. But this is just a workaround. The code should be modified by the author as the lines that throw the error contain a code that is no longer a part of C++.

%.o: %.cc
        gcc -std=c++14 -o $@ -c $< $(CCDEFINES) $(CCFLAGS)

dump_oas: dump_oas.o $(SOURCES:%.cc=%.o)
        g++ -std=c++14  -o $@ $^ $(LDFLAGS)

dump_gds2: dump_gds2.o $(SOURCES:%.cc=%.o)
        g++ -std=c++14 -o $@ $^ $(LDFLAGS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants