473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SQL Compiler for Linux on AMD/Opteron-64 bit machine

I am trying to compile SQL procedures on Linux running on AMD/Opteron
64-bit machine. I have 'gcc', 'cc' and 'g++' compilers on my machine. I
have set DB2_SQLROUTINE_COMPILE_COMMAND with various options, such as,
db2set DB2_SQLROUTINE_COMPILE_COMMAND="gcc -fPIC -$HOME/sqllib/include
SQLROUTINE_FILENAME.c -shared -o SQLROUTINE_FILENAME -L$HOME/sqllib/lib
-ldb2"

I have tried with/without "-fPIC" option. Without "-fPIC", I get
following error in a log file:

-- COMPILATION MESSAGES FOR
/home/q9test/sqllib/function/routine/sqlproc/TSTOPTO9/DTOPT/tmp/P2095479.c
/usr/bin/ld: /tmp/cciT6kha.o: relocation R_X86_64_32 can not be used
when making a shared object; recompile with -fPIC
/tmp/cciT6kha.o: could not read symbols: Bad value
collect2: ld returned 1 exit status

With "-fPIC" option, I get following error:
-- COMPILATION MESSAGES FOR
/home/q9test/sqllib/function/routine/sqlproc/TSTOPTO9/DTOPT/tmp/P2103884.c
/usr/bin/ld: skipping incompatible /home/q9test/sqllib/lib/libdb2.so
when searching for -ldb2
/usr/bin/ld: cannot find -ldb2
collect2: ld returned 1 exit status

Has anyone tried compiling SQL procs on AMD/opteron-64 bit machine
running Linux? Your help will be greatly appreciated.
Thanks a lot!!!

-- ashok

Nov 12 '05 #1
3 2249
What does db2level say your DB2 FixPak level and is? Is your DB2
instance a 32-bit or 64-bit instance?

Also, if you upgrade to FP7a, you won't need a C compiler anymore to
build SQL procedures.

Nov 12 '05 #2
Thanks for your prompt reply. Here is other info:

1) db2level output
DB21085I Instance "q9test" uses "32" bits and DB2 code release
"SQL08016" with
level identifier "02070106".
Informational tokens are "DB2 v8.1.1.58", "s040914", "MI00096", and
FixPak "6".
Product is installed at "/opt/IBM/db2/V8.1"

2) It is a 32-bit instance

3) We do not have an option to upgrade to FP7a yet. We prefer to be a
bit behind the curve.

-- ashok

Nov 12 '05 #3
Thanks for your prompt reply. Here is other info:

1) db2level output
DB21085I Instance "q9test" uses "32" bits and DB2 code release
"SQL08016" with
level identifier "02070106".
Informational tokens are "DB2 v8.1.1.58", "s040914", "MI00096", and
FixPak "6".
Product is installed at "/opt/IBM/db2/V8.1"

2) It is a 32-bit instance

3) We do not have an option to upgrade to FP7a yet. We prefer to be a
bit behind the curve.

-- ashok

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Computer Whizz | last post by:
Hiya... I've a little experience in C++, PHP, and a lot in BASIC... But I wish to move into C++ programming A LOT. Any good compilers/editors/VDI (visual development interface? - can't remember...
8
by: Scott Robert Ladd | last post by:
Hello, I've posted a comparison of recent GCC versions (3.3, 3.4, and the coming 4.0) with Intel C++ 8.1, including several benchmarks and "state-of-the-product" reviews. You can find the...
0
by: Nick Barr | last post by:
Heya, Does anyone have any experience of Linux Labs "Clusgres" (A Linux cluster hosting a PostgreSQL database server)? It seems to be a shared memory architecture for a clutser of linux boxes...
1
by: Rocael Hernandez | last post by:
Hello all, I was wondering what's best for PG, since we have to decide what will be the new server for our DB, that will serve one or more websites. Our actual configuration is a dual xeon...
3
by: Konrad Hinsen | last post by:
I am trying to install Python 2.4.3 on an AMD Opteron system using the Portland Group's compiler (pgcc). Using CC="pgcc -DNCURSES_ENABLE_STDBOOL_H=0" OPT="-O0" LINKFORSHARED="-Wl,- ...
4
by: LLessieux | last post by:
Hi, I have been seeing a strange behaviour when doing some tests on a Dual - Dual Core Opteron system using Windows XP (32bits with SP2). In out application we have a wrapper around the thread...
7
by: llothar | last post by:
Does anybody have some benchmarks or links to articles that compare this for different compiler implementations? I would especially like to see if it is usefull on MSVC, Intel 9.0 C and gcc. Also...
42
by: jacob navia | last post by:
http://slashdot.org/ "The leaner, lighter, faster, and most importantly, BSD Licensed, Compiler PCC has been imported into OpenBSD's CVS and NetBSD's pkgsrc. The compiler is based on the...
8
by: MacRules | last post by:
In office, I can have RedHat AS 4.0. And I like to configure a DB2 for home lab system. Which one is better OpenSuse 10.3 or CentOS?
11
by: Pablo Suarez | last post by:
In all my previous C++ projects I used the gcc as compiler. For some reasons I want to try out the Sun compiler instead. How can I install and use this compiler instead? Is the Sun C++...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.