Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
howtos:install_gschem_on_s11 [2015/12/09 16:36]
admin
howtos:install_gschem_on_s11 [2017/02/18 10:39]
admin [Missing locale.h header file]
Line 1: Line 1:
-====== Compiling gschem, pcb, gerbv on 11.3sru2 ====== +====== Compiling gschem, pcb, gerbv on 11.====== 
-Decided ​to recompile, since pcb was not able to import schematicWhen running from command line, gsch2pcb complained "No elements found, so nothing to do." +I have recently played a little bit with L80 Quectel GPS module and after a while decided ​to design PCB for the final version ​to be installed in my carAs usualcreated schema in gschem, then tried to "​Import Schematics"​ in pcb, but that failed. I tried with gsch2pcb as well and it didn't work either - gsch2pcb complained ​with "No elements found, so nothing to do." ​It seems I hit [[https://​bugs.launchpad.net/​pcb/​+bug/​700311//​|bug 700311]] - gnetlist is confused if gschem and pcb are installed to the different locations - exactly my case after I recompiled last time. 
-  * compiled ​with gcc 4.5.2 +So I had to recompile to install into standard /usr/local location. For gschem and gerbv, I followed the procedure I had used before, but went with slightly different set of requirements for pcb: 
-  * '--prefix'​ was not setso all three programs were installed ​in /usr/local/ directory +  * go with the latest bits from Git repository 
-After that, pcb was able to import schematic.+  * [[http://​pcb.geda-project.org/​obtaining.html|pcb web page]] mentions that pcb is known to build with the Oracle Studio compiler, so decided to give it a try 
 +  * try to build 64-bit binary 
 +===== Prerequisites ===== 
 +Since I wanted to build pcb with documentation which requires LaTeX, I had to deploy LaTeX first. It was in fact straightforward,​ went with [[http://​www.tug.org/​texlive/​|TeX Live]] which is an easy way to deploy TeX/LaTeX on Unix systems. 
 +And since I wanted to build with [[http://​www.oracle.com/​technetwork/​server-storage/​solarisstudio/​overview/​index.html|Oracle Solaris Studio]], I had to install that as well. Went with 12.release installed from Oracle package repository. 
 +===== Deploy from git ===== 
 +  * obtain the latest bits from Git repository 
 +<​code>​ 
 +$ git clone git://git.geda-project.org/​pcb.git pcb-git 
 +</​code>​ 
 +  * build and install 
 +<​code>​ 
 +$ cd pcb-git 
 +$ export PATH=/​usr/​local/​texlive/​2015/​bin/​i386-solaris:/​usr/​gnu/​bin:​$PATH 
 +$ ./​autogen.sh 
 +$ CC=/​opt/​SUNWspro/​bin/​cc CXX=/​opt/​SUNWspro/​bin/​CC CFLAGS="​-m64"​ LDFLAGS="​-L/​usr/​lib/​amd64"​ ./configure --disable-gl --disable-toporouter 
 +$ make 
 +$ sudo make install 
 +</​code>​ 
 +===== Deploy from tarballversion 4.0.0 ===== 
 +  * download the tarball 
 +<​code>​ 
 +$ wget https://​sourceforge.net/​projects/​pcb/​files/​pcb/​pcb-4.0.0/​pcb-4.0.0.tar.gz 
 +$ tar xvpf pcb-4.0.0.tar.gz 
 +</​code>​ 
 +  * minor tweaks required to build with Oracle Solaris Studio (version 12.4) 
 +<​code>​ 
 +$ diff -u pcb-4.0.0-orig/​src/​global.h pcb-4.0.0/​src/​global.h  
 +--- pcb-4.0.0-orig/​src/​global.h Sun Jan 15 19:40:45 2017 
 ++++ pcb-4.0.0/​src/​global.h ​     Sat Feb 18 10:33:55 2017 
 +@@ -177,7 +177,7 @@ 
 + #​define ANYOBJECTFIELDS ​                       \ 
 +        BoxType ​        ​BoundingBox; ​   \ 
 +        long int        ID;             \ 
 +-       ​FlagType ​       Flags; ​         \ 
 ++       ​FlagType ​       Flags 
 +        //      struct LibraryEntryType *net 
 +  
 + /* Lines, pads, and rats all use this so they can be cross-cast. ​ */ 
 + 
 +$ diff -u pcb-4.0.0-orig/​src/​layerflags.h pcb-4.0.0/​src/​layerflags.h 
 +--- pcb-4.0.0-orig/​src/​layerflags.h ​    Mon Oct 31 07:44:21 2016 
 ++++ pcb-4.0.0/​src/​layerflags.h ​ Sat Feb 18 10:34:12 2017 
 +@@ -31,10 +31,10 @@ 
 + #​ifndef PCB_LAYERFLAGS_H 
 + #​define PCB_LAYERFLAGS_H 
 +  
 +-unsigned int string_to_layertype (const char *typestring,​ 
 ++LayertypeType string_to_layertype (const char *typestring,​ 
 +                                   int (*error) (const char *msg)); 
 +-const char *layertype_to_string (unsigned int type); 
 +-unsigned int guess_layertype (const char *name, 
 ++const char *layertype_to_string (LayertypeType type); 
 ++LayertypeType guess_layertype (const char *name, 
 +                               int layer_number,​ 
 +                               ​DataType *data); 
 +</​code>​ 
 +  * build and install (built 64-bit with Oracle Solaris Studio 12.4) 
 +<​code>​ 
 +$ cd pcb-4.0.0 
 +$ export PATH=/​usr/​local/​texlive/​2015/​bin/​i386-solaris:/​usr/​gnu/​bin:​$PATH 
 +$ CC=/​opt/​SUNWspro/​bin/​cc CXX=/​opt/​SUNWspro/​bin/​CC CFLAGS="​-m64"​ LDFLAGS="​-L/​usr/​lib/​amd64"​ GDLIB_CFLAGS="​-I/​usr/​include/​gd2"​ GDLIB_LIBS="​-lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng -lz -lm -lgd" ./configure --disable-gl --disable-toporouter 
 +$ make 
 +$ sudo make install 
 +</​code>​ 
 + 
 +===== Gotchas ===== 
 +==== Missing locale.h header file (fixed ​in pcb 4.0.0) ==== 
 +Compilation fails, since following files are missing <​locale.h>​ header file: 
 +<​code>​ 
 +$ git status -s 
 +M  src/​main.c 
 +M  src/​print.c 
 +M  src/​gettext.h 
 +</​code>​ 
 +Adding following line to those files fixes the problem: 
 +<​code>​ 
 +#include <​locale.h>​ 
 +</​code>​ 
 +I filed [[https://​bugs.launchpad.net/​pcb/​+bug/​1529233|bug 1529233]] to track this problem. 
 +==== Broken texi2dvi(1) utility ==== 
 +**texi2dvi(1)** utility is used to convert document from Texinfo to PDF or TeX DVI format. However, it fails on Oracle Solaris: 
 +<​code>​ 
 +/usr/bin/​texi2dvi --pdf --batch pcb.texi 
 +/​usr/​bin/​texi2dvi[129]: ​local: not found [No such file or directory] 
 +/usr/​bin/​texi2dvi[224]:​ local: not found [No such file or directory] 
 +/​usr/​bin/​texi2dvi[224]:​ local: not found [No such file or directory] 
 +/​usr/​bin/​texi2dvi[224]:​ local: not found [No such file or directory] 
 +/​usr/​bin/​texi2dvi[174]:​ local: not found [No such file or directory] 
 +make[3]: *** [pcb.pdf] Error 127 
 +</​code>​ 
 +Reason being that it uses **/bin/sh** as a shell interpreter which on Linux maps to **bash(1)**but on Oracle Solaris **/bin/sh** points ​to **ksh93(1)**. And **ksh93(1)** lacks support for **local** built-in command. The script contains a check for that and tries to cope with that by defining **local** as a function, but I found out the check itself is broken. So to workaround the problem, I modified the script to explicitly use **/​usr/​bin/​bash** interpreter instead of **/bin/sh**.
 ====== Install gschem on S11FCS ====== ====== Install gschem on S11FCS ======
   * Download latest stable version of gschem from [[ftp://​ftp.geda-project.org/​geda-gaf/​stable/​|here]].   * Download latest stable version of gschem from [[ftp://​ftp.geda-project.org/​geda-gaf/​stable/​|here]].
Line 61: Line 152:
 <​code>​ <​code>​
 $ git clone git://​git.geda-project.org/​pcb.git pcb-git $ git clone git://​git.geda-project.org/​pcb.git pcb-git
-$ sudo pkg install developer/​build/​automake-111 developer/​build/​autoconf developer/​parser/​bison+$ sudo pkg install developer/​build/​automake-111 developer/​build/​autoconf developer/​parser/​bison ​developer/​lexer/​flex
 $ cd pcb-git $ cd pcb-git
 $ ./​autogen.sh $ ./​autogen.sh
Line 83: Line 174:
 $ cd pcb-20110918/​ $ cd pcb-20110918/​
 $ export PATH=/​usr/​gnu/​bin:​$PATH $ export PATH=/​usr/​gnu/​bin:​$PATH
-$ PKG_CONFIG_PATH=/​usr/​local/​lib/​pkgconfig ./configure --disable-gl --prefix=/​apps/​pcb-20110918+$ PKG_CONFIG_PATH=/​usr/​local/​lib/​pkgconfig ./configure --disable-gl ​--disable-doc --disable-toporouter ​--prefix=/​apps/​pcb-20110918
 $ make $ make
 $ sudo make install $ sudo make install
howtos/install_gschem_on_s11.txt · Last modified: 2017/02/18 10:40 by admin
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0