LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-02-2011, 01:02 PM   #1
biggocharley
LQ Newbie
 
Registered: Jun 2009
Location: Southeast Michigan
Distribution: ubuntu
Posts: 6

Rep: Reputation: 1
Compile and install from a tarball


I recently downloaded a tarball which contains a .src file for a program to convert .ttf fonts to .cxf fonts for use in Qcad drawings.First I have to stress that i am not a programmer so I really need help in how to compile and install this program in linuxmint 9 or ubuntu lucid. What I downloaded from the ribbonsoft.com website is a tarball called ttf2cxf-0.0.0.1-src.tar.gz. It contains a directory /ttf2cxf-0.0.0.1-src, which contains three files: main.cpp, Makefile, and ttf2cxf.
I can post the contents of these files if anyone feels that they can help me on this. This is not a high priority problem but i have been messing around with this for a while and have made no progress. Any help would be appreciated.
 
Old 05-02-2011, 02:27 PM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
Is there a file called configure in there ?
If so extract the tarball to a directory then, in a terminal cd to the directory ttf2cxf-0.0.0.1-src.
issue the commands (1 at a time)
./configure
make
make install


You can omit the second line sometimes. If there is no configure file, then just issue make install (or make then make install).

Last edited by smoker; 05-02-2011 at 02:30 PM.
 
Old 05-02-2011, 03:44 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,393

Rep: Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607
The binary 'ttf2cxf' is ready to use as is, for 32bits :

cd ttf2cxf-0.0.0.1-src/ && ./ttf2cxf <options>


If you want a new "ttf2cxf", it can be compiled with gcc-3.3 :
g++-3.3 -o ttf2cxf -I/usr/include/freetype2 -lfreetype main.cpp
( It's the "One line Makefile", edited to gcc-3.3 ).

..
 
Old 05-02-2011, 04:09 PM   #4
biggocharley
LQ Newbie
 
Registered: Jun 2009
Location: Southeast Michigan
Distribution: ubuntu
Posts: 6

Original Poster
Rep: Reputation: 1
Thanks for getting back to me so promptly.

Followed your instructions --as you can see --alot of errors --here are the results:

charley@mint-2 ~/ttf2cxf/ttf2cxf-0.0.0.1-src $ ./configure
bash: ./configure: No such file or directory
charley@mint-2 ~/ttf2cxf/ttf2cxf-0.0.0.1-src $ make
g++ -o ttf2cxf -I/usr/include/freetype2 -lfreetype main.cpp
main.cpp:25:22: error: ft2build.h: No such file or directory
main.cpp:26:10: error: #include expects "FILENAME" or <FILENAME>
main.cpp:27:10: error: #include expects "FILENAME" or <FILENAME>
main.cpp:28:10: error: #include expects "FILENAME" or <FILENAME>
main.cpp:30: error: ‘FT_Library’ does not name a type
main.cpp:31: error: ‘FT_Face’ does not name a type
main.cpp:45: error: ‘FT_Vector’ was not declared in this scope
main.cpp:45: error: ‘to’ was not declared in this scope
main.cpp:45: error: expected primary-expression before ‘void’
main.cpp:45: error: initializer expression list treated as compound expression
main.cpp:46: error: ‘FT_Vector’ was not declared in this scope
main.cpp:46: error: ‘to’ was not declared in this scope
main.cpp:46: error: expected primary-expression before ‘void’
main.cpp:46: error: initializer expression list treated as compound expression
main.cpp:47: error: ‘FT_Vector’ was not declared in this scope
main.cpp:47: error: ‘control’ was not declared in this scope
main.cpp:47: error: ‘FT_Vector’ was not declared in this scope
main.cpp:47: error: ‘to’ was not declared in this scope
main.cpp:47: error: expected primary-expression before ‘void’
main.cpp:47: error: initializer expression list treated as compound expression
main.cpp:48: error: ‘FT_Vector’ was not declared in this scope
main.cpp:48: error: ‘control1’ was not declared in this scope
main.cpp:48: error: ‘FT_Vector’ was not declared in this scope
main.cpp:48: error: ‘control2’ was not declared in this scope
main.cpp:48: error: ‘FT_Vector’ was not declared in this scope
main.cpp:48: error: ‘to’ was not declared in this scope
main.cpp:48: error: expected primary-expression before ‘void’
main.cpp:48: error: initializer expression list treated as compound expression
main.cpp:51: error: ‘FT_Outline_Funcs’ does not name a type
main.cpp:62: error: redefinition of ‘int moveTo’
main.cpp:45: error: ‘int moveTo’ previously defined here
main.cpp:62: error: ‘FT_Vector’ was not declared in this scope
main.cpp:62: error: ‘to’ was not declared in this scope
main.cpp:62: error: expected primary-expression before ‘void’
main.cpp:70: error: redefinition of ‘int lineTo’
main.cpp:46: error: ‘int lineTo’ previously defined here
main.cpp:70: error: ‘FT_Vector’ was not declared in this scope
main.cpp:70: error: ‘to’ was not declared in this scope
main.cpp:70: error: expected primary-expression before ‘void’
make: *** [all] Error 1
charley@mint-2 ~/ttf2cxf/ttf2cxf-0.0.0.1-src $ make install
make: *** No rule to make target `install'. Stop.
charley@mint-2 ~/ttf2cxf/ttf2cxf-0.0.0.1-src $

looks like I have a lot of "stuff" missing.
 
Old 05-03-2011, 04:01 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,393

Rep: Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607
Quote:
main.cpp:25:22: error: ft2build.h: No such file or directory
sudo apt-get install libfreetype6-dev
.. will install the missing header.

And : Repeat, the Makefile has one line only, no 'make install' is available !
Read post # 3 !

What happens, when you run ./ttf2cxf ?
( And the command 'uname -a' will tell if you have a 64bits OS.)

Also : 1) The 32bits binary ttf2cxf runs OK on a 64bits Ubuntu.
2) A 64 bits Ubuntu package ttf2cxf-0.0.0.1ubuntu_x86_64.deb ( 6 kB ) is here
https://docs.google.com/uc?id=0B7S25...CNigk9AM&hl=en

..

Last edited by knudfl; 05-03-2011 at 04:44 AM.
 
Old 05-03-2011, 02:07 PM   #6
biggocharley
LQ Newbie
 
Registered: Jun 2009
Location: Southeast Michigan
Distribution: ubuntu
Posts: 6

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by knudfl View Post
The binary 'ttf2cxf' is ready to use as is, for 32bits :

cd ttf2cxf-0.0.0.1-src/ && ./ttf2cxf <options>


If you want a new "ttf2cxf", it can be compiled with gcc-3.3 :
g++-3.3 -o ttf2cxf -I/usr/include/freetype2 -lfreetype main.cpp
( It's the "One line Makefile", edited to gcc-3.3 ).

..
Thanks for letting me know this. I tried the command and am getting an error message that a shared lib file is missing <libstdc++.so.5>. I will try to remedy this and give it another try. I'll post the results.
Thanks again
 
Old 05-03-2011, 02:25 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,393

Rep: Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607
'libstdc++.so.5' :

sudo apt-get install libstdc++5
 
Old 05-03-2011, 05:32 PM   #8
biggocharley
LQ Newbie
 
Registered: Jun 2009
Location: Southeast Michigan
Distribution: ubuntu
Posts: 6

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by knudfl View Post
'libstdc++.so.5' :

sudo apt-get install libstdc++5
This didn't do it --this file is no longer available in the later ubuntu realeases but I found it here: “deb http://cz.archive.ubuntu.com/ubuntu hardy main universe” and it seems to work.
Here's what i get when I run the command:

charley@mint-2 ~/ttf2cxf/ttf2cxf-0.0.0.1-src $ ./ttf2cxf
Usage: ttf2cxf <options> <ttf file> <cxf file>
ttf file: An existing True Type Font file
cxf file: The CXF font file to create
options are:
-n nodes Number of nodes for quadratic and cubic splines (int)
-a author Author of the font. Preferably full name and e-mail address
-l letter spacing Letter spacing (float)
-w word spacing Word spacing (float)
-f line spacing factor Default is 1.0 (float)

I copied arial.ttf to my current directory and tried this:

charley@mint-2 ~/ttf2cxf/ttf2cxf-0.0.0.1-src $ ./ttf2cxf arial.ttf arial_converted.cxf
TTF file: arial.ttf
CXF file: arial_converted.cxf
FT_New_Face: Unknown error
Segmentation fault


Now I have to figure out what the "Unknown error " is.
 
Old 05-03-2011, 05:46 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,393

Rep: Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607
Quote:
this file is no longer available in the later ubuntu realeases
'libstdc++5' for Lucid : I guess, you will have to add "lucid-backports"
to /etc/apt/sources.list


The package is actually available for the latest Ubuntus
http://packages.ubuntu.com/lucid-backports/libstdc++5 :
[dapper] [hardy] [hardy-updates] [lucid-backports] [maverick] [natty] [oneiric]
 
Old 05-03-2011, 06:06 PM   #10
biggocharley
LQ Newbie
 
Registered: Jun 2009
Location: Southeast Michigan
Distribution: ubuntu
Posts: 6

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by knudfl View Post
'libstdc++5' for Lucid : I guess, you will have to add "lucid-backports"
to /etc/apt/sources.list


The package is actually available for the latest Ubuntus
http://packages.ubuntu.com/lucid-backports/libstdc++5 :
[dapper] [hardy] [hardy-updates] [lucid-backports] [maverick] [natty] [oneiric]
Might this explain my "Unknown error" problem I mentioned on my last post? If so it is certainly worth a try.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install a tarball? Ubuntonian Linux - Newbie 5 02-24-2011 02:16 AM
trying to install tarball pintobean Mandriva 7 04-21-2006 07:06 AM
make install does not install daemons (clamd snortd). Is this a feature of tarball? Emmanuel_uk Linux - Newbie 3 11-15-2005 02:29 AM
how do u install a tarball? brianwoods Linux - Newbie 4 05-27-2004 09:11 PM
KDE 3.2.2 (base tarball) Source Compile Problem gccslix Linux - Newbie 1 05-14-2004 10:44 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration