You are not logged in.

#1 2008-07-03 01:43:50

visio159
Member
Registered: 2008-07-03
Posts: 31

How to install GCC 3.3 and Berkeley DB ?

Hi to all

I am doing a project written in C. It involves the use of BerkeleyDB database too.

Tthe problem is that the project compiles successfully on GCC 3.3 but on GCC 4.3 its gives error due to strict checking.
Kindly tell me how can I install GCC 3.3 on archlinux.

Also how can I install Berkeley DB (including development package) on archlinux with all the header files and configure it.

thanks to all of you

regards
visio159

Offline

#2 2008-07-03 01:48:21

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: How to install GCC 3.3 and Berkeley DB ?

"pacman -S gcc3"  will get you gcc-3.3.   Berkley DB and all header files should already be on your system.

Offline

#3 2008-07-03 08:29:10

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: How to install GCC 3.3 and Berkeley DB ?

Hi visio159,

apart from the correct answer Allan already gave you, can we help you to fix the gcc 4.3 compile errors? This is usually just a matter of including some header files and not very difficult. smile

Offline

#4 2008-07-03 11:26:51

visio159
Member
Registered: 2008-07-03
Posts: 31

Re: How to install GCC 3.3 and Berkeley DB ?

Thanks guys I am loving Archlinux, the speed and control is amazing.

I installed GCC 3.3 and db.h was already in /usr/include/db.h

but when I compiled the code (MAIN.c) it gave these errors in db.h ??? I don't know what to do now, db.h itself is reflecting errors..huh.

As you can see the starting lines are directing towards db.h as having errors sad

[noface@myhost PROJ]$ gcc-3.3 MAIN.c -ldb
gcc-3.3: ldb: No such file or directory
In file included from MAIN.c:3:
/usr/include/db.h:1201: error: syntax error before "u_int"
/usr/include/db.h:1206: error: syntax error before '}' token
/usr/include/db.h:1544: error: syntax error before "u_int"
/usr/include/db.h:1660: error: `close' redeclared as different kind of symbol
/usr/include/unistd.h:320: error: previous declaration of `close'
/usr/include/db.h:1702: error: `remove' redeclared as different kind of symbol
/usr/include/stdio.h:155: error: previous declaration of `remove'
/usr/include/db.h:1703: error: `rename' redeclared as different kind of symbol
/usr/include/stdio.h:157: error: previous declaration of `rename'
/usr/include/db.h:1740: error: `stat' redeclared as different kind of symbol
/usr/include/sys/stat.h:210: error: previous declaration of `stat'
/usr/include/db.h:1742: error: `sync' redeclared as different kind of symbol
/usr/include/unistd.h:933: error: previous declaration of `sync'
/usr/include/db.h:1743: error: `truncate' redeclared as different kind of symbol
/usr/include/unistd.h:949: error: previous declaration of `truncate'
/usr/include/db.h:1809: error: syntax error before '}' token
/usr/include/db.h:1916: error: syntax error before "u_int"
/usr/include/db.h:1923: error: conflicting types for `close'
/usr/include/db.h:1660: error: previous declaration of `close'
/usr/include/db.h:1925: error: conflicting types for `del'
/usr/include/db.h:1664: error: previous declaration of `del'
/usr/include/db.h:1926: error: `dup' redeclared as different kind of symbol
/usr/include/unistd.h:490: error: previous declaration of `dup'
/usr/include/db.h:1927: error: conflicting types for `get'
/usr/include/db.h:1669: error: previous declaration of `get'
/usr/include/db.h:1928: error: conflicting types for `get_priority'
/usr/include/db.h:1687: error: previous declaration of `get_priority'
/usr/include/db.h:1929: error: conflicting types for `pget'
/usr/include/db.h:1700: error: previous declaration of `pget'
/usr/include/db.h:1930: error: conflicting types for `put'
/usr/include/db.h:1701: error: previous declaration of `put'
/usr/include/db.h:1931: error: conflicting types for `set_priority'
/usr/include/db.h:1734: error: previous declaration of `set_priority'
/usr/include/db.h:1975: error: syntax error before '}' token
/usr/include/db.h:2126: error: syntax error before "u_int"
/usr/include/db.h:2145: error: syntax error before "mp_ncache"
/usr/include/db.h:2211: error: syntax error before "cl_id"
/usr/include/db.h:2267: error: syntax error before '*' token
/usr/include/db.h:2282: error: conflicting types for `close'
/usr/include/db.h:1923: error: previous declaration of `close'
/usr/include/db.h:2287: error: conflicting types for `err'
/usr/include/db.h:1665: error: previous declaration of `err'
/usr/include/db.h:2288: error: conflicting types for `errx'
/usr/include/db.h:1666: error: previous declaration of `errx'
/usr/include/db.h:2291: error: conflicting types for `get_cachesize'
/usr/include/db.h:1672: error: previous declaration of `get_cachesize'
/usr/include/db.h:2294: error: conflicting types for `get_encrypt_flags'
/usr/include/db.h:1674: error: previous declaration of `get_encrypt_flags'
/usr/include/db.h:2295: error: conflicting types for `get_errfile'
/usr/include/db.h:1676: error: previous declaration of `get_errfile'
/usr/include/db.h:2296: error: conflicting types for `get_errpfx'
/usr/include/db.h:1677: error: previous declaration of `get_errpfx'
/usr/include/db.h:2297: error: conflicting types for `get_flags'
/usr/include/db.h:1678: error: previous declaration of `get_flags'
/usr/include/db.h:2312: error: conflicting types for `get_msgfile'
/usr/include/db.h:1683: error: previous declaration of `get_msgfile'
/usr/include/db.h:2313: error: conflicting types for `get_open_flags'
/usr/include/db.h:1685: error: previous declaration of `get_open_flags'
/usr/include/db.h:2364: error: conflicting types for `open'
/usr/include/db.h:1698: error: previous declaration of `open'
/usr/include/db.h:2365: error: conflicting types for `remove'
/usr/include/db.h:1702: error: previous declaration of `remove'
/usr/include/db.h:2387: error: syntax error before "u_int"
/usr/include/db.h:2391: error: syntax error before "u_int"
/usr/include/db.h:2393: error: syntax error before "u_int"
/usr/include/db.h:2398: error: conflicting types for `set_alloc'
/usr/include/db.h:1705: error: previous declaration of `set_alloc'
/usr/include/db.h:2402: error: conflicting types for `set_cachesize'
/usr/include/db.h:1713: error: previous declaration of `set_cachesize'
/usr/include/db.h:2405: error: conflicting types for `set_encrypt'
/usr/include/db.h:1716: error: previous declaration of `set_encrypt'
/usr/include/db.h:2406: error: conflicting types for `set_errcall'
/usr/include/db.h:1717: error: previous declaration of `set_errcall'
/usr/include/db.h:2408: error: conflicting types for `set_errfile'
/usr/include/db.h:1719: error: previous declaration of `set_errfile'
/usr/include/db.h:2409: error: conflicting types for `set_errpfx'
/usr/include/db.h:1720: error: previous declaration of `set_errpfx'
/usr/include/db.h:2412: error: conflicting types for `set_feedback'
/usr/include/db.h:1721: error: previous declaration of `set_feedback'
/usr/include/db.h:2413: error: conflicting types for `set_flags'
/usr/include/db.h:1722: error: previous declaration of `set_flags'
/usr/include/db.h:2431: error: conflicting types for `set_msgcall'
/usr/include/db.h:1730: error: previous declaration of `set_msgcall'
/usr/include/db.h:2432: error: conflicting types for `set_msgfile'
/usr/include/db.h:1731: error: previous declaration of `set_msgfile'
/usr/include/db.h:2433: error: conflicting types for `set_paniccall'
/usr/include/db.h:1733: error: previous declaration of `set_paniccall'
/usr/include/db.h:2448: error: conflicting types for `stat_print'
/usr/include/db.h:1741: error: previous declaration of `stat_print'
/usr/include/db.h:2510: error: syntax error before '}' token
/usr/include/db.h:2632: error: syntax error before "u_long"
In file included from MAIN.c:6:
/usr/include/fcntl.h:85: error: `open' redeclared as different kind of symbol
/usr/include/db.h:2364: error: previous declaration of `open'
In file included from /media/evt/PROJ/PROJ/include/makeTreeDB.h:2,
                 from MAIN.c:19:
/media/evt/PROJ/PROJ/include/berkeleyDB.h: In function `removeDB':
/media/evt/PROJ/PROJ/include/berkeleyDB.h:36: warning: passing arg 1 of pointer to function makes pointer from integer without a cast
/media/evt/PROJ/PROJ/include/berkeleyDB.h:36: error: too few arguments to function
/media/evt/PROJ/PROJ/include/berkeleyDB.h:37: warning: passing arg 1 of pointer to function from incompatible pointer type
/media/evt/PROJ/PROJ/include/berkeleyDB.h:37: error: too few arguments to function
/media/evt/PROJ/PROJ/include/berkeleyDB.h: In function `addNodeToBerkeleyDB':
/media/evt/PROJ/PROJ/include/berkeleyDB.h:64: error: dereferencing pointer to incomplete type
/media/evt/PROJ/PROJ/include/berkeleyDB.h:84: error: dereferencing pointer to incomplete type
/media/evt/PROJ/PROJ/include/berkeleyDB.h:96: error: dereferencing pointer to incomplete type
In file included from MAIN.c:21:
/media/evt/PROJ/PROJ/include/scanProc.h: In function `scanProc':
/media/evt/PROJ/PROJ/include/scanProc.h:92: warning: passing arg 1 of pointer to function from incompatible pointer type
/media/evt/PROJ/PROJ/include/scanProc.h:92: warning: passing arg 2 of pointer to function from incompatible pointer type
/media/evt/PROJ/PROJ/include/scanProc.h:92: error: too few arguments to function
/media/evt/PROJ/PROJ/include/scanProc.h: In function `showSummary':
/media/evt/PROJ/PROJ/include/scanProc.h:235: warning: passing arg 1 of pointer to function from incompatible pointer type
/media/evt/PROJ/PROJ/include/scanProc.h:235: warning: passing arg 2 of pointer to function from incompatible pointer type
/media/evt/PROJ/PROJ/include/scanProc.h:235: error: too few arguments to function
In file included from MAIN.c:22:
/media/evt/PROJ/PROJ/include/bigProcessing.h: In function `bigProcessing':
/media/evt/PROJ/PROJ/include/bigProcessing.h:58: error: dereferencing pointer to incomplete type
/media/evt/PROJ/PROJ/include/bigProcessing.h:95: error: dereferencing pointer to incomplete type
/media/evt/PROJ/PROJ/include/bigProcessing.h: In function `scanFS_DB':
/media/evt/PROJ/PROJ/include/bigProcessing.h:158: error: dereferencing pointer to incomplete type
/media/evt/PROJ/PROJ/include/bigProcessing.h:178: error: dereferencing pointer to incomplete type
/media/evt/PROJ/PROJ/include/bigProcessing.h:206: error: dereferencing pointer to incomplete type
/media/evt/PROJ/PROJ/include/bigProcessing.h:211: error: dereferencing pointer to incomplete type
/media/evt/PROJ/PROJ/include/bigProcessing.h:219: error: dereferencing pointer to incomplete type
/media/evt/PROJ/PROJ/include/bigProcessing.h:224: error: dereferencing pointer to incomplete type

Offline

#5 2008-07-03 11:34:51

visio159
Member
Registered: 2008-07-03
Posts: 31

Re: How to install GCC 3.3 and Berkeley DB ?

wuischke wrote:

Hi visio159,

apart from the correct answer Allan already gave you, can we help you to fix the gcc 4.3 compile errors? This is usually just a matter of including some header files and not very difficult. smile

thaks @wuischke, I will surely bump this thread soon again to make the code GCC 4.3 compatible too. But current problem is much of more priority to me, I have to give a demonstration to Project Manager. This program was written in redhat 7 and was compiled fine there but on any other distro it gave db.h problem, I have tried many but nothing seem to work sad

Offline

#6 2008-07-05 13:08:04

gnud
Member
Registered: 2005-11-27
Posts: 182

Re: How to install GCC 3.3 and Berkeley DB ?

If you want help, you have to be more specific.
I can compile a program that includes the db.h with gcc-3.3 wihtout errors.

Check that your system is up to date? (thinking of berkley db now). Otherwise, post some code that produces those errors for you.

Offline

Board footer

Powered by FluxBB