WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: *SOLVED* GCC Compiler Missing Header  (Read 26265 times)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: GCC Compiler Missing Header
« Reply #15 on: March 16, 2013, 12:01:34 AM »
Code: [Select]
#include <vga.h>is a reference in every C program using svgalib, but to be able to run such a program you need to compile, install and configure the binaries of svgalib first!
« Last Edit: March 16, 2013, 11:38:25 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11701
Re: GCC Compiler Missing Header
« Reply #16 on: March 16, 2013, 01:11:49 AM »
Hi eltone
I took a look at linmain.c and tinypoodle is correct, it wants the vga.h from the svgalib package, not linux-headers.
Don't bother trying svgalib-1.4.3, that package only makes references to very old kernels (2.0-2.3) and probably
won't compile. Your best bet is probably building the version from the link in reply#9.

Offline eltone

  • Full Member
  • ***
  • Posts: 137
Re: GCC Compiler Missing Header
« Reply #17 on: March 16, 2013, 12:01:49 PM »
Your best bet is probably building the version from the link in reply#9.
Hi Rich,
I see no SVGALib nor ggi listing:

http://distro.ibiblio.org/tinycorelinux/3.x/tcz/index_nojs.html

http://www.ggi-project.org/links.html

I must turn the page!
THX 4 RPY 2 post!
eltone

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11701
Re: GCC Compiler Missing Header
« Reply #18 on: March 16, 2013, 12:20:11 PM »
Hi eltone
It's not in the repository. Go to:
https://github.com/ryanmcgrath/svgalib-1
and click on the  ZIP  button to download the zipped package.

Offline eltone

  • Full Member
  • ***
  • Posts: 137
Re: GCC Compiler Missing Header
« Reply #19 on: March 16, 2013, 12:52:00 PM »
Hi eltone
It's not in the repository. Go to:
https://github.com/ryanmcgrath/svgalib-1
and click on the  ZIP  button to download the zipped package.

Hi Rich,

I understand AraLinux SRC will compile on the latest Slackware build:

http://slackware.com/

In addition to SVGALib, these DEPS are required, says the developer...

libc-2.*
libpthread-*
libvga.so.1.*
libvgagl.so.1.*
***********
Suspect it is 'closed' architecture, for security, since everything is vulnerable in cyberspace.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11701
Re: GCC Compiler Missing Header
« Reply #20 on: March 16, 2013, 01:15:08 PM »
Hi eltone
libc-2.13  is installed by default.
libpthread.so  is in  eglibc_base-dev.tcz
libvga.so.1.*  and  libvgagl.so.1.*  will be created when you compile  svgalib

Offline eltone

  • Full Member
  • ***
  • Posts: 137
Re: GCC Compiler Missing Header
« Reply #21 on: March 16, 2013, 03:48:27 PM »

libvga.so.1.*  and  libvgagl.so.1.*  will be created when you compile  svgalib

Greetings Rich,

Thanks for the motavation, but w_n_o_$ is my dialect.

What TCP indexing unzips svgalib and what directory should svgalib be in when unzipping?

Also, 'make' should follow what install criteria for TCP:

Installation
   If you are happy with the configuration in 'Makefile.cfg' which means
   that you want to install an ELF shared library and probably an a.out
   shared library for support of some old binaries (and if the svgalib tar
   file you got already contains such an precompiled a.out shared library)
   just running

   make install

   as root should take care of proper installation. After installation,
   you MUST edit /etc/vga/libvga.config to set the monitor and mouse type.
   Depending on your hardware, other setup might be required. Checkout
   'man 7 svgalib' for details after you installed svgalib (or see
   doc/0-README)

   It is a good idea to read and check the configurable section of
   Makefile.cfg nevertheless, even if you don't think you have to. Also,
   if your are using GLIBC you have to uncomment the definition of
   USEGLIBC in Makefile.cfg as glibc is not completely compatible to the
   linux libc (at least at compile time).

   Let me rephrase this: YOU MUST COMPILE AND INSTALL AS ROOT.
   If you don't nothing bad will happen during compilation, but certain
   tools won't be able to become SETUID ROOT which is required for
   proper operation.

   In case you change anything in 'Makefile.cfg' which does not just control
   which parts to install and where, you *MUST* issue a 'make clean' prior to
   'make install' to remove any already compiled objects and force complete
   recompilation.

   Edit Makefile.cfg to change installation paths and to select the parts
   that should be installed.

   If you have an ET4000 card, read 'man 7 svgalib.et4000' and copy the
   appropriate register file to et4000.regs. Remember to set the DAC type.

   The default behaviour is the following:

   Shared libraries are installed in /lib and /usr/local/lib, header files
   in /usr/local/include (any old header files in /usr/include are
   removed). In the Slackware distribution the linkable libraries are in
   /usr/lib, and the utilities in /usr/bin; these are now removed by 'make
   install'. Until now just doing make install with Slackware might have
   produced duplicate binaries, but fortunately the newer version in
   /usr/local/* would have taken precedence in use.

   The et4000 registers (et4000.regs) are installed as
   /etc/vga/libvga.et4000, but only if this file does not exit yet. The
   same goes for the configuration file, libvga.config.

   Textmode utilities are installed in /usr/local/bin. These are
   restorefont, runx, restorepalette, dumpreg, restoretextmode, textmode,
   savetextmode, fix132x43, and mode3.

   If you change Makefile.cfg to install the static libraries, static
   libraries are compiled, and installed in /usr/local/lib. Note that you
   do not need to do this; the shared library is enough.

   If you now run 'make demoprogs', the demo programs are created in the
   demos/ and threeDKit/ directory. If you

   You can remove previously installed files (not the et4000 registers and
   config file and manual pages) with 'make uninstall'.

   In 1.28 the makefiles were changed. With minimal effort you can compile
   it from a separate (even read-only) source tree. Just make a copy of
   Makefile and Makefile.cfg into a writable dir, and change srcdir (or
   override from environment) to the directory where the source code is.

   This feature, as well as the code for ELF compilation was kindly
   contributed by Stephen Lee <sl14@crux1.cit.cornell.edu>.

   `make static' compiles a static version of svgalib. It is not
   automatically installed by default but you can enable that from
   Makefile.cfg. Note though, that if you specify installation of the static
   libraries in 'Makefile.cfg' a simple 'make install' will compile the
   static library first.

   If you do not configure Makefile.cfg to install the shared libs, the
   demoprogs and utilities are linked against the new static lib
   (regardless of one already installed). However, the static libraries are
   not build automatically then. You must issue a 'make static' first.

   Building elf or a.out shared libraries can easily be configured in the
   Makefile.cfg. Be sure to issue a `make clean' after changing the
   TARGET_FORMAT setting.

   If you specified elf, `make install' will compile the shared libs as
   they don't come pre-built. This is nothing to worry about. Compilation
   is easy and will not use any user action.

   This is not true for a.out and there is a special hack in the makefiles
   for this. As svgalib is distributed there is no attempt to recompile the
   a.out sharedlibs. Prebuild images are already included.

   If you have the required tools-* installed and if you made patches (or
   just feel like recompiling) issue a `make clean' and `make shared' to
   enforce recompiling of the a.out sharedlibs (from then on even a make
   install will update the shared library if sources changed). Issue `make
   distclean' after a `make shared' to fall back to the distribution
   behaviour.

   However, getting the right tools becomes more and more complicated as
   it gets less important to give a.out support. Right now you even have to
   hand patch the last tools-* release to make it usuable with current
   compilers. In general I discourage trying to compile the a.out libs.
   Just use the images that come with svgalib.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11701
Re: GCC Compiler Missing Header
« Reply #22 on: March 16, 2013, 04:23:54 PM »
Hi eltone
Quote
but w_n_o_$ is my dialect.
I don't know what that means.
I don't think it really matters where you unzip it. Create a subdirectory to work in, copy the zip file there, and
unzip it.
I would just try  make install, if it does something you don't like, you can reboot and the system will be as it was before.

Offline eltone

  • Full Member
  • ***
  • Posts: 137
Re: GCC Compiler Missing Header
« Reply #23 on: March 16, 2013, 05:25:45 PM »
Hi eltone
Quote
but w_n_o_$ is my dialect.
I don't know what that means.
I don't think it really matters where you unzip it. Create a subdirectory to work in, copy the zip file there, and
unzip it.
I would just try  make install, if it does something you don't like, you can reboot and the system will be as it was before.
Hi Rich,

I've had no 'PC' choice other than Micro$oft, since purchasing my first in the eighties.  I just started cutting my teeth, the past year on Linux and my review of TCP has been impressive!

1) Just to confirm, I will create a svga directory, e.g.:
/home/tc/svgalib

2) copy the zip file into it using 'pcman'.

2b) now to unzip, should I use CLI or terminal?  What is the preferred way to select CLI and what syntax returns to Desktop from CLI?

3) CD to svgalib directory
unzip -d file.zip

4) compile
make install
***********
eltone

Offline eltone

  • Full Member
  • ***
  • Posts: 137
Re: GCC Compiler Missing Header
« Reply #24 on: March 16, 2013, 06:17:02 PM »
Create a subdirectory to work in, copy the zip file there, and
unzip it.

Hi,

Any help getting the correct switches for 'unzip' to function correctly:

Code: [Select]

tc@box:~/svgalib$ unzip -d svgalib-1-master.zip
BusyBox v1.20.2 (2012-08-07 01:31:01 UTC) multi-call binary.

Usage: unzip [-opts[modifiers]] FILE[.zip] [LIST] [-x XLIST] [-d DIR]

Extract files from ZIP archives

        -l      List archive contents (with -q for short form)
        -n      Never overwrite files (default)
        -o      Overwrite
        -p      Send output to stdout
        -q      Quiet
        -x XLST Exclude these files
        -d DIR  Extract files into DIR

tc@box:~/svgalib$

***************
eltone

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11701
Re: GCC Compiler Missing Header
« Reply #25 on: March 16, 2013, 07:37:50 PM »
Hi eltone
Try   unzip svgalib-1-master.zip

Offline eltone

  • Full Member
  • ***
  • Posts: 137
Re: GCC Compiler Missing Header
« Reply #26 on: March 16, 2013, 09:45:43 PM »
Hi Rich,

2b) now to unzip, should I use CLI or terminal?  What is the preferred way to select CLI and what syntax returns to Desktop from CLI?


TCP Forum,
I've been told CLI is much better than terminal!  I use terminal 100% w/TCP, since it's a simple click on the terminal icon.  Please provide an example to unzip svgalib w/CLI?
Cheers!
eltone

Offline eltone

  • Full Member
  • ***
  • Posts: 137
Re: GCC Compiler Missing Header
« Reply #27 on: March 16, 2013, 10:03:28 PM »


I would just try  make install, if it does something you don't like, you can reboot and the system will be as it was before.




4) compile
make install
[/quote]

Code: [Select]
tc@box:~/svgalib$ make install
make: *** No rule to make target `install'.  Stop.
tc@box:~/svgalib$

 

Hi,
Obviously, 'make install' does not compile svgalib.  What can be missing?
eltone





Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: GCC Compiler Missing Header
« Reply #28 on: March 16, 2013, 11:35:57 PM »
I understand AraLinux SRC will compile on the latest Slackware build:

http://slackware.com/


Funny to find this when reading up forum posts while finally being logged in under svgalib after endless fiddling around.

Cherrypicking the svgalib package from Slackware current in package browser and then hacking to adapt it to Core did the job for me.
So much for the good news...
The really bad news is that I could not find any way in endless hours of trial and error to prevent Arachne from segfaulting (binary as provided from Glenn's site).
I can't really find why it segfaults each time, neither with trial and error of countless config combinations, nor with strace.
When I became desperate and couldn't really understand if the cause of failure is in svgalib or arachne, I cherrypicked links built with svgalib support as well from Slackware's package browser, and I must say it works like a charm!
Admittedly my skills of using strace are very limited, but at least the way I ran it, I found that when running links under strace it would actually fail to start, while per se it works perfectly well.
Not sure if that is my bad use of strace (options) or a particularity when starting svgalib apps with strace on a framebuffer console.
Therefore I have given up to run arachne with strace.
« Last Edit: March 16, 2013, 11:39:08 PM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11701
Re: GCC Compiler Missing Header
« Reply #29 on: March 16, 2013, 11:47:51 PM »
Hi eltone
Quote
I've been told CLI is much better than terminal!  I use terminal 100% w/TCP, since it's a simple click on the terminal icon.
CLI (console mode) means you don't have a desktop, just a black screen with text. There is nothing wrong with using
a terminal. One is not better than the other. Arachne is meant to run in a console and will not run in a terminal om a
desktop. While Arachne appears to be active again, Linux support has been dropped, see:
http://glennmcc.org/
I tried building  svgalib  and while it built  libvgagl.so, it seems to fail to create  libvga.so. I think you might want to
consider using a browser that has better Linux support.
Quote
Obviously, 'make install' does not compile svgalib.  What can be missing?
You forgot to change into the  svgalib-1-master  directory after unzipping the zip file.