Tiny Core Linux

Tiny Core Base => CorePlus => Topic started by: eltone on March 09, 2013, 09:07:01 PM

Title: *SOLVED* GCC Compiler Missing Header
Post by: eltone on March 09, 2013, 09:07:01 PM
Hi,

Cannot compile  SRC, due to missing vga.h header on TCP 4.73.  Where is the GCC dependency that is used to load this missing header file/folder 'vga.h'?

THX
eltone
Title: Re: GCC Compiler Missing Header
Post by: gerald_clark on March 09, 2013, 09:17:35 PM
Apps provides functions says it is in linux-headers.
Title: Re: GCC Compiler Missing Header
Post by: eltone on March 09, 2013, 10:36:40 PM
Apps provides functions says it is in linux-headers.

Hi gerald_clark,
Your suggestion resulted in the same error dialog:

tc@box:$make -f svgalib/makefile
gcc -march=i486 -O2 -fomit-frame-pointer -g -Wall -D LINUX -D POSIX -D CLEMTEST -D OVRL -D NOKEY -D HICOLOR    -c -o linmain.o linmain.c
linmain.c:7:17: fatal error: vga.h: No such file or directory
compilation terminated.
make: *** [linmain.o] Error 1
tc@box:$
*************
THX 4 RPY!
eltone
Title: Re: GCC Compiler Missing Header
Post by: gerald_clark on March 09, 2013, 10:44:32 PM
Edit your makefile to correspond to Core standards.
Title: Re: GCC Compiler Missing Header
Post by: eltone on March 09, 2013, 10:56:12 PM
Edit your makefile to correspond to Core standards.
Hi gerald_clark,
Core Standards might be different than mine.  Please point me to the one etched-in-stone?

eltone
*orignal makefile:

TH# Makefile for Arachne on Linux

CC=gcc
STRIP=strip

CFLAGS  = -march=i486 -O2 -fomit-frame-pointer -g -Wall
CFLAGS += -D LINUX -D POSIX -D OVRL -D NOKEY -D CLEMTEST -D HICOLOR -D GGI
OFILES  = linmain.o linglue.o iekernel.o ie_fce.o ie_key.o str.o
OFILES += ie_bin.o fexists.o config.o version.o errors.o outs.o html.o
OFILES += htmlutil.o htmtable.o htmlread.o htmlstat.o atoms.o scrolbar.o
OFILES += htmldraw.o svgastat.o svgaovrl.o guidraw.o hdrawgif.o hdrawbmp.o
OFILES += urlovrl.o urlstat.o mime.o misc.o inettime.o v_putimg.o html256c.o
OFILES += entity.o search.o htmlcsim.o putikonw.o gui.o guitick.o protocol.o
OFILES += guieven2.o highligh.o init.o globals.o guievent.o cgiquery.o print.o
OFILES += drawtime.o prtscr.o onmouse.o prespalp.o ipalpal.o tagsort.o main.o
OFILES += bitpix8.o x_char.o x_text.o x_font.o x_txtwh.o x_charmax.o x_cursor.o
OFILES += asockets.o http.o htkernel.o base64.o inetstr.o ps.o anyimage.o
OFILES += wheelmou.o parsecss.o

LIBS    = -lggi -lpthread

%.o: ../%.c
   $(CC) $(CFLAGS) -c -o $*.o $<

arachne:   $(OFILES)
   $(CC) -o arachne-ggi $(OFILES) $(LIBS)
#   $(STRIP) arachne

clean:
   @rm -f *.o arachne-ggiX
***********
Title: Re: GCC Compiler Missing Header
Post by: gerald_clark on March 09, 2013, 11:03:31 PM
look in /usr/local/src.
Title: Re: GCC Compiler Missing Header
Post by: tinypoodle on March 10, 2013, 01:53:50 AM
Do you have a working svgalib installation?
Title: Re: GCC Compiler Missing Header
Post by: eltone on March 12, 2013, 10:24:50 AM
Do you have a working svgalib installation?
Hi tinypoodle,
First off, does the makefile provided meet Core Standards?  The svgalib is the next hurdle and need your skillfullness getting a working installation of it?
The only recipe I've got to work with:
SRC:
http://glennmcc.org/aralinux/
EXTRACT:
tar -z -xf arachne-src-1.97.tgz
CD TO THE ASRC197 DIRECTORY:
make -f svgalib/makefile
***************
eltone
Title: Re: GCC Compiler Missing Header
Post by: tinypoodle on March 12, 2013, 10:50:43 AM
I somehow suspect you might need svgalib installed first, plus possibly svgalib dev files as well.
Title: Re: GCC Compiler Missing Header
Post by: tinypoodle on March 12, 2013, 10:55:41 AM
Thing is that it is not guaranteed svgalib could compile against recent kernel versions.

There is some project trying to keep it on life support with patches here:
https://github.com/ryanmcgrath/svgalib-1
Title: Re: GCC Compiler Missing Header
Post by: tinypoodle on March 12, 2013, 11:14:29 AM
And it looks like the missing vga.h you mention in OP is most likely part of svgalib source.
Title: Re: GCC Compiler Missing Header
Post by: eltone on March 15, 2013, 02:29:37 AM
And it looks like the missing vga.h you mention in OP is most likely part of svgalib source.

Hey tinypoodle!
Are you referring to svgalib-1.4.3.tar.gz, found here:

http://svgalib.org/

If so, what syntax is used for untarring/installing vga.h in the correct directory?

eltone
Title: Re: GCC Compiler Missing Header
Post by: Rich on March 15, 2013, 02:55:27 AM
Hi eltone
You installed  linux-headers-3.0.21-tinycore.tcz ?
Quote
linmain.c:7:17: fatal error: vga.h: No such file or directory
Does that line read:
Code: [Select]
#include <vga.h>If so, try changing it to:
Code: [Select]
#include <video/vga.h>
Title: Re: GCC Compiler Missing Header
Post by: tinypoodle on March 15, 2013, 03:16:18 AM
And it looks like the missing vga.h you mention in OP is most likely part of svgalib source.

Hey tinypoodle!
Are you referring to svgalib-1.4.3.tar.gz, found here:

http://svgalib.org/

If so, what syntax is used for untarring/installing vga.h in the correct directory?

eltone
Yes, that's the official stable version from 2001...
You would have to build and install svgalib according to documentation, but please first re-read all my prior posts in this thread and the whole page of the link in Reply #9
Title: Re: GCC Compiler Missing Header
Post by: eltone on March 15, 2013, 11:31:54 PM
Hi eltone
You installed  linux-headers-3.0.21-tinycore.tcz ?
Quote
linmain.c:7:17: fatal error: vga.h: No such file or directory
Does that line read:
Code: [Select]
#include <vga.h>If so, try changing it to:
Code: [Select]
#include <video/vga.h>
Rich,
VGA.H was tracked back to origin:
Code: [Select]
/lib/modules/3.0.21-tinycore/build/include/video/vga.h
Inorder to decipher what line 7:17 reads, could you provide a index-map to linmain.c?

eltone
Title: Re: GCC Compiler Missing Header
Post by: tinypoodle 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!
Title: Re: GCC Compiler Missing Header
Post by: Rich 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.
Title: Re: GCC Compiler Missing Header
Post by: eltone 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
Title: Re: GCC Compiler Missing Header
Post by: Rich 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.
Title: Re: GCC Compiler Missing Header
Post by: eltone 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.
Title: Re: GCC Compiler Missing Header
Post by: Rich 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
Title: Re: GCC Compiler Missing Header
Post by: eltone 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.
Title: Re: GCC Compiler Missing Header
Post by: Rich 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.
Title: Re: GCC Compiler Missing Header
Post by: eltone 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
Title: Re: GCC Compiler Missing Header
Post by: eltone 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
Title: Re: GCC Compiler Missing Header
Post by: Rich on March 16, 2013, 07:37:50 PM
Hi eltone
Try   unzip svgalib-1-master.zip
Title: Re: GCC Compiler Missing Header
Post by: eltone 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
Title: Re: GCC Compiler Missing Header
Post by: eltone 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




Title: Re: GCC Compiler Missing Header
Post by: tinypoodle 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.
Title: Re: GCC Compiler Missing Header
Post by: Rich 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.
Title: Re: GCC Compiler Missing Header
Post by: tinypoodle on March 16, 2013, 11:52:53 PM
In addition to SVGALib, these DEPS are required, says the developer...

libc-2.*
libpthread-*
libvga.so.1.*
libvgagl.so.1.*
***********
The latter 2 are the essence of svgalib!
Title: Re: GCC Compiler Missing Header
Post by: tinypoodle on March 16, 2013, 11:57:04 PM
libpthread.so  is in  eglibc_base-dev.tcz
Also found in Core base ;)
Title: Re: GCC Compiler Missing Header
Post by: tinypoodle on March 17, 2013, 12:19:49 AM
While Arachne appears to be active again, Linux support has been dropped, see:
http://glennmcc.org/
I don't think that is the accurate interpretation after digging deeper, rather that the way it is phrased on frontpage does lead to such a misinterpretation.
From what I understand, what is meant (but not stated without a doubt) is that while 1.95 is available as build (binaries), the Linux version of 1.97 is available in source form only.
That would get more obvious when looking at the version number of the targets of the links here:
http://glennmcc.org/aralinux/

Quote
I tried building  svgalib  and while it built  libvgagl.so, it seems to fail to create  libvga.so.
Curious, did you attempt to build the kernel helper module as well?
Title: Re: GCC Compiler Missing Header
Post by: Rich on March 17, 2013, 01:29:50 AM
Hi tinypoodle
It built the object file for vga_helper but I'm guessing the build bombed before building the module.
Title: Re: GCC Compiler Missing Header
Post by: tinypoodle on March 17, 2013, 02:10:01 AM
I was interested about because this is a kernel module which has actually another usage unrelated to svgalib:
It would allow the use of the vidix video drivers without a need of running as root or SUID (at least so with mplayer).
Title: Re: GCC Compiler Missing Header
Post by: tinypoodle on March 17, 2013, 02:51:11 AM
consider using a browser that has better Linux support.

...or that:

(http://upurs.us/thumb/46845.jpeg) (http://upurs.us/image/46845.png)

:P
Title: Re: GCC Compiler Missing Header
Post by: eltone on March 17, 2013, 09:36:20 AM
consider using a browser that has better Linux support.

...or that:

(http://upurs.us/thumb/46845.jpeg) (http://upurs.us/image/46845.png)

:P

Dear tinypoodle and Rich:

The page has been turned.  Thanks for your time, replying to my post.
Returning to DosBox would be one step forward and two backwards!

Best TCP wishes,
eltone