-nodisplay bug with Sun Studio 10 for Linux installer
I'm currently trying to install a trial Sun Studio 10 for Linux on a Fedora Core 3 box. I want the installer to run via the command line, so I use "./installer -nodisplay", but I get the following error message:
java.lang.UnsatisfiedLinkError: /home/pacey/SS10/.install/jvm_1.4.2/j2re1.4.2_06/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
libXp is part of the X window system, but I've specified -nodisplay. A non-graphics option shouldn't be trying to load graphics libraries - looks like a bug. Anyway, as I don't have version 6 of that lib on my system, I'm stalled on this. Any suggestions?
I'm currently trying to install a trial Sun Studio 10 for Linux on a Fedora Core 3 box. I want the installer to run via the command line, so I use "./installer -nodisplay", but I get the following error message:
java.lang.UnsatisfiedLinkError: /home/pacey/SS10/.install/jvm_1.4.2/j2re1.4.2_06/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
libXp is part of the X window system, but I've specified -nodisplay. A non-graphics option shouldn't be trying to load graphics libraries - looks like a bug. Anyway, as I don't have version 6 of that lib on my system, I'm stalled on this. Any suggestions?
Similar Messages
-
How to change Makefile file name in sun studio for linux 11?
Greetings,
For historical reasons, our makefiles are called Make.bld
Sun Studio refuses to accept these as makefiles.
It'd be a big pain to modify our entire build system to take makefile as the name.
Is there a way to instruct sun studio to accept a different filename for makefiles ?
Thanks,
BillThere is no supported way of getting the Sun Studio IDE (or NetBeans) to recognize
Make.bld as a Makefile. However, the solution Nik pointed out with a .nbattrs file will
work.
Here is a complete file which, if copied to each directory containing a Make.bld file
will work. However, if the directory already contains a .nbattrs file you should edit
the existing one and add the <fileobject>...</fileobject> lines rather than overwriting
the entire file.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE attributes PUBLIC "-//NetBeans//DTD DefaultAttributes 1.0//EN"
" http://www.netbeans.org/dtds/attributes-1_0.dtd">
<attributes version="1.0">
<fileobject name="Make.bld">
<attr name="MAKEFILE_TYPE" stringvalue="foo"/>
</fileobject>
</attributes>
Note: I split the DOCTYPE line myself. It should be a single line in the file (although
its probably OK if split, I didn't verify that so I'll suggest a single line).
I should warn you that the next release of the Sun Studio IDE will no longer use
.nbattrs files and you'll need a different solution. A preliminary version of the next
release is currently available by downloading Sun Studio Express 3. The IDE is
significantly better than the current one! You also get a lot of the same features
by downloading NetBeans 5.5 with the C/C++ Development Pack.
Gordon -
Problems with sun studio 12 in suse linux 11
Hi.
I installed Sun Studio 12 suse linux with no problems. However, the debugging modules (DBX) are not working any more. When I started Sun Studio, it gave a message about modules that could not be loaded in tha moment. I did not pay attention. But I noticed that all debugging options were disabled.
Using the module manager, I saw the DBX module was not checked, and I could not change it. I was marked with a red X. So I thought to reinstall the application. However, the uninstall utility doesn't work either.
According with the documentation, running ./uninstaller does it, but I get the following error message instead
Exception in thread "main" java.lang.NoClassDefFoundError: uninstall_Sun_Studio_12/class
Caused by: java.lang.ClassNotFoundException: uninstall_Sun_Studio_12.class
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
I tried to uninstall manually, and then execute installer, by using first the software manager in linux and deleting the producregistry file manually. It worked because I executed the installer. However, in Sun Studio IDE, debugging options are still not available despite I "reinstalled" the application. I checked the log files and they say the file uninstall_Sun_Studio_12.class could not be written.
So my questions are:
1. Is there any other way to repair Sun Studio? What could be the possible for this module to stop working?
2. Does anyone have an idea of why the installer cannot write the uninstaller class?
I found that perhaps problems regarding Java / Netbeans versions could be the problem, but the ones I have installed are those packages that were installed along with Sun Studio, and both are valid.
Thank you very much.Perhaps you can simply delete the Sun Studio 12 installation tree, because it will not work on SUSE Linux 11.
This OS is not supported, so any problems you see with SS12 on SUSE 11 will not be fixed.
But we have a newer version, that should work better.
You can try to download and install Sun Studio Express 2008/11 (extract pre-installed image from tar.bz2 file).
Here is a pointer to the web page:
http://developers.sun.com/sunstudio/downloads/express
All you need is to provide a email address, and press "Download Now" button.
You will see a page, that gives you 2 options to download Sun Studio Express 2008/11.
Use "Option 2": Download Tarfile Installer
Thanks,
Nik -
Compiling MySQL 5.1.26-rc with Sun Studio Express on Linux?
I managed to compile MySQL 5.1.26-rc with Sun Studio Express on Linux (OpenSuse 10.2 on x64), but I get unexpected crashes every time a connection thread exits:
(gdb) where
#0 0x00002b2ce0649535 in raise () from /lib64/libc.so.6
#1 0x00002b2ce064a990 in abort () from /lib64/libc.so.6
#2 0x00002b2cdf949795 in __pthread_unwind () from /lib64/libpthread.so.0
#3 0x00002b2cdf944425 in pthread_exit () from /lib64/libpthread.so.0
#4 0x00000000005048b2 in one_thread_per_connection_end (thd=0x16d88f0, put_in_cache=false)
at /home/mysql/debug/sql//mysqld.cc:1893
#5 0x0000000000513b75 in handle_one_connection (arg=0x16d88f0) at /home/mysql/mysql-5.1.26-rc/sql//sql_connect.cc:1122
#6 0x00002b2cdf94309e in start_thread () from /lib64/libpthread.so.0
#7 0x00002b2ce06da4cd in clone () from /lib64/libc.so.6
#8 0x0000000000000000 in ?? ()If I compile with gcc using e.g. BUILD/compile-amd64-debug-max, I have no issue! But I want to use Sun Studio in order to be consistent with the Solaris version, and also because Sun Studio is likely to produce better code.
Here is the compilation script, it downloads and extracts the source tree and builds it (it assumes Sun Studio Express is installed in /opt/sun):
#!/bin/bash
export PATH=/opt/sun/sunstudioceres/bin:$PATH
wget -q http://mir2.ovh.net/ftp.mysql.com/Downloads/MySQL-5.1/mysql-5.1.26-rc.tar.gz
tar xpf mysql-5.1.26-rc.tar.gz
cd mysql-5.1.26-rc
# Explicitly specify libs to avoid linking with the STL.
export LIBS="-xnolib -lCrun -lm -lc -lrt"
autoreconf --force --install > autoreconf.log 2>&1
export MY_FLAGS="-g -mt -xtarget=generic -m64"
CC=cc CXX=CC CFLAGS=$MY_FLAGS CXXFLAGS=$MY_FLAGS ./configure --with-big-tables --without-embedded-server --disable-shared --with-pthread --with-ssl -with-plugins=max > configure.log 2>&1
gmake -j > build.log 2>&1Any idea about what is going wrong?
Thanks.Possibly the actual CC (or cc) command lines are not correct. The proper way to say not to link libCstd is the command-line option -library=no%Cstd. Then you don't need to add the default system libraries like -lc to the command line.
Can you show the actual CC command lines that are generated by the makefile? They should be in the compilation log. I'd also like to see the command line(s) used to create dynamic libraries, if any, and the final executable. -
Code generation bug in Sun Studio 12
Hi,
The following program prints `Failure' when compiled with -xO4 where nothing should be printed (when compiled with no optimization or -xO2). It looks to me that the first comparison `buggy_routine' against 0x80 is returning True where it should return False.
#include <stdlib.h>
#include <stdio.h>
typedef unsigned long long int EIF_NATURAL_64;
typedef unsigned char EIF_BOOLEAN;
typedef int EIF_INTEGER_32;
typedef char * EIF_REFERENCE;
char s[] = "9223372036854775808";
void buggy_routine (EIF_REFERENCE Current, EIF_NATURAL_64 arg1)
EIF_NATURAL_64 tu8_1;
tu8_1 = (EIF_NATURAL_64) ((EIF_INTEGER_32) 128L);
if ((EIF_BOOLEAN) (arg1 <= tu8_1)) {
} else {
if ((EIF_BOOLEAN) (arg1 <= ((EIF_NATURAL_64) 9223372036854775808ull ))) {
} else {
printf("Failure\n");
int main (int argc, char ** argv, char **envp ) {
EIF_NATURAL_64 loc2 = (EIF_NATURAL_64) 0;
loc2 = (EIF_NATURAL_64) atoll(s);
buggy_routine ("s", loc2);
}To reproduce:
cc -xO4 bug.c -o bug ; ./bug
It fails on both 32 and 64-bit code generation for x86. I haven't tried on Sparc as I need to install Sun Studio 12. Is this a known issue? Is there an easy workaround?
I tried with Sun Studio 11 and it worked just fine there.
Regards,
Manu
PS: I've tried with both version (the first is the one from the default installation) and the second after I noticed there were some patches available:
cc: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12
cc: Sun C 5.9 SunOS_i386 Patch 124868-02 2007/11/27An issue filed at bugs.sun.com does not go directly into the bug database. It is evaluated, and if it turns out the report is actually a bug not previously reported, goes into the database. You get a notification and chance to reply after the report is evaluated.
In this case, I picked up your report myself, and filed the bug. The bug ID is 6654314, and will be visible at bugs.sun.com in a day or two. -
Trouble viewing disassembly with Sun Studio 11
I was wondering how someone can bring up a window with a program�s disassembly when debugging a C program with Sun Studio 11. (SPARC). I would like to be able to set breakpoints at specific assembly instructions using Sun Studios�s GUI interface rather than using typed commands with DBX. I would also like to know how to get a window that shows the current value of the registers. Any help would be greatly appreciated.
ChrisOops, it appears that you can't set breakpoints
through Disassembler window, it just shows the code
and current position within the code, that's all.It
gives you better view of context than dbx's 'dis' or
'list -i' commands, though.Actually you can set breakpoints through Disassembler window:
- select an address, click right mouse button to open context menu
- choose "Set Breakpoint"
If you need this feature, please file an RFE (Request
For Enhancement) through bugs.sun.comThe Disassembler window has been significantly improved between
EA1 and FCS. Now users can set and delete breakpoints using the
same way as they do in source file - click on the left gray area (toggle
breakpoints). Also Disassembler window has "Step Into", "Step Over",
"Step Out" and "Run To Cursor" buttons.
Thanks,
Nik -
Is it possible to integrate j2ee enviroment with sun studio developer???
Dear all,
I currently developing a jsp based web application with sun studio enterprise but sun studio by default does not support j2ee environment, i think it only support to j2SE.
i want to use persistence and enterprise beans with my application but don't know, how to do it with sun studio developer.
i can install the persistence and ejb api's separately, but i dont know whether sun developer will support them
Can any on tell, what is the best tool for web application developement, while i will need to java uml diagrams later on.
i would be grateful, if someone can help, i am really desprate
shafqat zamanSun Java Studio Enterprise 8.1 (built on top on NetBeans 5.0) does support j2ee (and j2se) development.
For developing j2ee applications, both NetBeans (latest version is 5.5, http://www.netbeans.org) and SJSE can be used. For a comparison on SJSE and NetBeans, please take a look at:
http://forum.java.sun.com/thread.jspa?forumID=747&threadID=5113472
For a list of all development tools from Sun, please take a look at http://developers.sun.com/prodtech/devtools/free/index.html..
i want to use persistence and enterprise beans with my application but don't know,
how to do it with sun studio developer.For j2ee development, please check out NetBeans 5.5 ; there are several tutorials available at http://www.netbeans.org/kb/index.html. (Since SJSE is built on top on NetBeans, SJSE can also be used and all the NetBeans documents also will apply to SJSE). -
Optimizer bug in C compiler for Linux
Save the following as bug.c:
Bug report against Sun C for Linux:
$ suncc -V
cc: Sun C 5.9 Linux_i386 Build27_2 2006/08/02
usage: cc [ options] files. Use 'cc -flags' for details
$ cat /etc/SuSE-release
SuSE Linux 9.3 (x86-64)
VERSION = 9.3
$ uname -r
2.6.11.4-21.8-smp
Compiled w/ -xO2 or lower, this program runs to completion:
$ suncc -xO2 bug.c -o bug -lpthread && ./bug
Hello from thread 0
Hello from thread 1
Hello from thread 2
Hello from thread 3
DONE.
However, when compiled w/ -xO3 (or higher) this program hangs:
$ suncc -xO3 bug.c -o bug -lpthread && ./bug
Hello from thread 0
Hello from thread 1
Hello from thread 2
Hello from thread 3
...hung here...
^C
Changing "#if 0" to "#if 1" changes a "while (cond) {body;}" to a
"do {body;} while(cond)", and is sufficient to work around the
problem in this case.
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <pthread.h>
static unsigned int numthreads = 4;
static void test_pthread_barrier(void) {
static pthread_cond_t barrier_cond[2] =
{ PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER };
static pthread_mutex_t barrier_mutex[2] =
{ PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER };
static volatile unsigned int barrier_count = 0;
static volatile int phase = 0;
const int myphase = phase;
pthread_mutex_lock(&barrier_mutex[phase]);
barrier_count++;
if (barrier_count < numthreads) {
#if 0
do {
pthread_cond_wait(&barrier_cond[myphase], &barrier_mutex[myphase]);
} while (myphase == phase);
#else
while (myphase == phase) {
pthread_cond_wait(&barrier_cond[myphase], &barrier_mutex[myphase]);
#endif
} else {
barrier_count = 0;
phase = !phase;
pthread_cond_broadcast(&barrier_cond[!phase]);
pthread_mutex_unlock(&barrier_mutex[!phase]);
static void * thread_main(void * arg) {
printf("Hello from thread %d\n", (int)(uintptr_t)arg);
test_pthread_barrier();
return NULL;
int main(void) {
int i;
pthread_t *threadid = (pthread_t *)malloc(sizeof(pthread_t)*numthreads);
for(i=0;i<numthreads;i++) {
void *threadarg;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); /* ignore failures */
pthread_create(&threadid, &attr, &thread_main, (void *)(uintptr_t)i);
pthread_attr_destroy(&attr);
for(i=0;i<numthreads;i++) {
void *retval = NULL;
pthread_join(threadid[i], &retval);
free(threadid);
printf("DONE.\n");
return 0;You can refer to this bug as 6499729.
The bug status will soon be visible on bugs.sun.com -
Is it possible to run sun studio 12 ide with sun studio 8 compiler?
Hi, i am in the process of evaluating sun studio 12. Our company cannot move to sun studio 12 compiler collection right now as it is a huge code base and it will take us few months even before we start using sun studio 12 compiler in our development environment. Is it possible to use sun studio 12 ide with sun studio 8 compiler collection(CC, dbx etc)? Your feedback is appreciated. thank you.
There are two parts to the answer.
1) whether you can
To choose a compiler set follow Tools->Options->C/C++
and in the BuildTools tab you'll see how it picks up
compilers from your PATH.
This dialog doesn't govern choice of dbx, which will always
come from the installation. However you can alter which dbx
is used by presetting the environment variable SPRO_DBX_PATH
to teh full pathname of a dbx of your choice.
2) whether you should
The IDE should work reasonably well with older compilers. They
are not that tightly bound.
The IDE will not work well enough with an older dbx, especially as
old as studio 8. However, while not officially supported or tested
the SS12 dbx should be reasonably bwd compatible with code
generated from older compilers.
So my recommendation is: don't use SPRO_DBX_PATH and
give the old compilers a try. -
Are there serious bugs with SUN one studio
sometimes when I an trying to perform some particular type of operations in SUN one studio community edition on my pentium III 600MHz 256MB RAM system, SUN one studio vapourises from the deskop even faser than it does when u exit normally, i changed platform to Linux installing the linux binaries..the same problem also occurs..I heppens usually when i right click on a package trying to add new bean, or JSP or some other features
Well i hope it is not my own machine that is bugging SUN studio
ThanksI do but it still retains the same problem. I have jdk1.4.1 and yet it just vaporises from my desktop. Do SUN one studio have serious memory conflict with certain processes or what.
-
Sun Studio 10 Linux, RHEL3 U4, install fails on openmotif21.
Hello everyone,
As a long-time user of Sun WorkShop... I mean Forte.. I mean Studio; it was with great anticipation that I downloader Sun Studio 10 for Linux.
On one machine it failed to install and on another it installed properly.
Here are the details:
- Machine 1: RHEL3 U2 (x86/i686), small install: Installation of Studio 10 went fine.
- Machine 2: RHEL3 U4 (x86/i686), complete install : Installation of Studio 10 failed. The following can be gathered from the logs under /var/opt/sun:
[....snip....]
Installing Sun Studio Software
Log file: /var/opt/sun/install/logs/Sun_Studio_Software_install.A04060111
Installed: /var/prod/com.sun.studio_10/uninstall_Sun_Studio_Software.class
Uninstaller is at: /var/prod/com.sun.studio_10/uninstall_Sun_Studio_Software.class
Standalone Tools: Building Software
Installing RPM: sun-dmake-10.0-1
[....snip....]
System packages supporting Sun Studio Software
Installing RPM: openmotif-2.1.31-2_IST
error: Failed dependencies:
openmotif < 2.2.2 conflicts with openmotif21-2.1.30-9.RHEL3.4
Error: RPM openmotif-2.1.31-2_IST install failed}.
Install complete. Package: openmotif-2.1.31-2_IST
rpm: Skipping rpm remove of openmotif-2.1.31-2_IST, not installed.
rpm: Skipping rpm remove of sun-svc-locale-zh-10.0-1, not installed.
[....snip....]
And everything is removed. Is this issue documented somewhere? Is there a workaround?
Thanks for reading,
VincentDeselecting 'system supporting packages' from the Sun Studio 10 installation list made the trick and Studio finished installing.
However, I have a few concerns:
1) Since Studio will be using the system's openmotif, will it be supported? (I guess not).
2) Since openmotif-2.1.31-2_IST.i386.rpm from the Studio 10 IDE kits lands under /usr/OpenMotif-2.1.31 and should not conflict with any kind of other/system openmotif, why didn't SUN just create a sun-openmotif-support package? This would prevent a naming conflict when trying to install on RHEL3 if RHEL's openmotif21 is already installed?
3) It appears to work fine, even without SUN's provided openmotif.
Cheers,
Vincent -
Core dump using iostream with Sun Studio 8
I'm running on Solaris 9 using C++ compiler Sun Studio 8, and encoutered a very strange problem.
My application failed with a core and here is the stack.
[1] t_splay(0x3774b470, 0x387a0ec0, 0x389aec60, 0x39e5ef1f, 0x3774b470, 0x1), at 0xfc347930
[2] t_delete(0x387a0ec0, 0x80, 0x39be9748, 0x20, 0x383ccd20, 0x0), at 0xfc347698
[3] mallocunlocked(0x80, 0x0, 0x21b08, 0xfc3bc000, 0x10, 0x20), at 0xfc346d40
[4] malloc(0x80, 0xfbaa7400, 0x1, 0x759c40, 0x0, 0x0), at 0xfc346b74
[5] operator new(0x80, 0x0, 0xd3a18, 0x759c74, 0x0, 0x8345fc), at 0x760c10
[6] strstreambuf::overflow(0xf41f6e28, 0x29, 0xf41f6e28, 0x39fe0e88, 0x39fe0e88, 0x8345fc), at 0x75bb1c
[7] streambuf::xsputn(0xf41f6e28, 0xfee00bc0, 0x1, 0x0, 0x81010100, 0x1), at 0x75ab94
[8] unsafe_ostream::outstr(0xf41f6e78, 0xfee00bbf, 0x0, 0x0, 0xf41f6e7c, 0xfffffffe), at 0x757bac
=>[9] unsafe_ostream::operator<<(this = 0xf41f6e78, _s = 0xfee00bbf ")"), line 1211 in "iostream.h"
[10] ostream::operator<<(this = 0xf41f6e74, _s = 0xfee00bbf ")"), line 1350 in "iostream.h"
[11] CorInterfaceEntity::ifState(this = 0x1bc3de78, newState = MISMATCH_OF_INSTALLED_AND_EXPECTED, needToSendEvent = false
Can somebody help me giving a direction of investigation ?
Is there perhaps known problem with iostream on Sun Studio 8 running on Solaris 9 ?
Thanks for any tips.
Yaakov Berkovitch
[email protected]But sorry for my insistence, but do you think that
purify or/and runtime are not able to detect any
corruption of the heap ?They can detect some kinds of corruption, such as some uses of an invalid pointer.
But a wild pointer that changes the value of data that is part of your program cannot be detected by RTC or Purify. Those programs can't know whether that change is intentional.
>
BTW, we are not using any volatile declaration, and weIf non-local data is shared among threads, it should be declared volatile. For example, suppose you have
x = foo;
... // code not changing foo
y = foo;
If foo is not marked volatile, the compiler is allowed to assume its value hasn't changed, and assign to y the same value assigned to x. If foo was changed by another thread, y will not have the current value of foo. The "volatile" declaration says that the variable's value might change without any obvious reason, and the compiler should generate code to load a fresh value each time it is referenced.
are using the rwtools library packaged with the
compiler, and are not using the STD library.OK, you are not running into a std::string synchronization bug.
>
Also about the compiler option -xarch=v8, is probably
not relevant for us because we are running Solaris 9.
So the relevant compiler is probably -xarch=v9. Do you
advise us using this option ?I think you misunderstand. The -xarch values refer to the kind of processor your program will run on.
The -xarch=v8 option generates 32-bit code that will run on all SPARC chips, including the chips found in very old SPARCstations. This option is the default for compilers prior to Sun Studio 9 (which ships this week).
The -xarch=v8plus option generates 32-bit code that runs only on UltraSPARC chips, found in Ultra workstations. These are the only kinds of workstations shipped by Sun since about 1996. Unless you need to support the ancient SPARCstations, we recommend compiling with -xarch=v8plus, to get smaller and faster code.
The -xarch=v9 option generates 64-bit code that runs only on UltraSPARC chips, an only on Solaris 7 or later. Unless your program requires a very large address space, you generally don't want to generate 64-bit code. On SPARC, 64-bit code is larger and slower than 32-bit code. (Type "long" and all pointers are 64 bits instead of 32 bits.)
>
Also I want to return you two new questions:
1) I read in another discussion,
http://forum.sun.com/thread.jsp?forum=5&thread=18124&me
sage=47854#47854
that another memory manager can be more efficient in
multi-threaded environment (libmtmalloc.so), and also
an alternate threads library (/usr/lib/lwp) that
reduced CPU usage. Do you advice us using this
alternate library ?The libmtmalloc library usually has better performance in MT programs than the default version of malloc. It also can result in more memory fragmentation. In that case, the larger working set can sometimes have a large negative effect, more than offsetting the MT efficiency. You have to experiment to see whether it is appropriate for your particlular program. If you are running into heap corruption, the pattern of corruption will probably be different with libmtmalloc than with the default malloc. The differences might provide a clue to what is wrong.
The alternative "T2" threads library was introduced in Solaris 8 as an option.
In Solaris 9 it is the default, so you are already using it.
>
2) We are using the Rogue Wave library shiped with the
compiler. Is it an up-to-date version ? Can we assume
that is a good choice or it will be preferable to move
to the STD library ?I assume you mean Rogue Wave Tools.h++. As explained in the compiler docs, this version of Tools is obsolete, and has not been supported for many years. We continue to provide it for customers who used it before the introduction of the C++ Standard Library in 1998, and who don't want to change their code. We do not recommend it for use in new code. -
Using boost::thread with Sun Studio C++ gives error
Hi,
I'm trying to compile a code which uses the boost thread library, but I get the following error:
CC -library=stlport4 -features=tmplife -features=tmplrefstatic -mt -c -o t t.cpp
"/opt/boost/include/boost/thread/pthread/mutex.hpp", line 142: Error: The function "pthread_mutex_timedlock" must have a prototype.
"/opt/boost/include/boost/thread/pthread/mutex.hpp", line 142: Error: The function "pthread_mutex_timedlock" must have a prototype.
"/opt/boost/include/boost/thread/detail/thread.hpp", line 344: Error: boost::thread::thread(boost::thread&) is not accessible from boost::move(boost::detail::thread_move_t<boost::thread>).
"/opt/boost/include/boost/thread/pthread/recursive_mutex.hpp", line 179: Error: The function "pthread_mutex_timedlock" must have a prototype.
"/opt/boost/include/boost/thread/pthread/recursive_mutex.hpp", line 179: Error: The function "pthread_mutex_timedlock" must have a prototype.
5 Error(s) detected.
make: *** [t] Error 5the sample source code in question here just a single include:
#include <boost/thread.hpp>This is with boost 1.40.0. I wonder what I'm doing wrong..
AkosOK, I tried latest version of CC from Sun Studio 12 update 1 and can say that
- the error about constructor not being accessible is Sun C++ compiler "feature" (only called feature because it existed for so long) that allows binding of rvalues to non-const references; this "feature" will probably be turned off in the next release. It can't be changed in a patch because client's code might rely on it.
- the other errors are also not Boost-specific: the result of incompatibility of Linux headers and Sun C++ compiler; more thorough investigation is due, but in the past we had several problems like this. This particular can be solved by adding
-D_GNU_SOURCE to compile line. -
Poor performance of string::append on Solaris 10 with Sun Studio 10
I found string::append(size_type num, char ch) of libCstd consumes too much cpu time comparing with stlport. Anybody knows if this is a known issue on Solaris 10 and Sun Studio 10? Or if I need to use special build options to build with libCstd?
For example: a.c
#include <iostream>
#include <time.h>
using namespace std;
int main()
string ss;
for ( i=0; i<60000; i++)
ss.append(1, 'A');
cout << clock();
cout << endl;
return 0;
}Build with libCstd:
CC a.c -o a1
Build with stlport:
CC -library=%none -library=stlport4 a.c -o a2
a1 outputs: 10000
a2 outputs: 1900000
You can see how big different they have. I am sure their running environment is same.I suspect this is due to a bug in libCstd that manifests itself by reallocating the string for each append. Compile and run the program below:
#include <string>
#include <new>
#include <stdlib.h>
int in_main;
void* operator new (size_t nbytes) throw (std::bad_alloc) {
if (in_main) printf ("operator new (%zu)\n", nbytes);
return malloc (nbytes);
void operator delete (void *p) throw () {
if (in_main) printf ("operator delete (%p)\n", p);
free (p);
int main () {
in_main = 1;
std::string ss;
for (int i = 0; i < 256; i++) {
printf ("append(1, 'A')\n");
ss.append (1, 'A');
in_main = 0;
} -
Failed to install php-oci8 with instant Client for linux 64
Hello,
I have a 64-bits Linux box with RHEL4, and PHP version has been upgraded from 4.3.9 to 5.1.6. I try to make the connection to remote oracle server.
I download instantclient-basic-linuxppc-10.2.0.2-20060327.zip , and follow the instruction to
install it.
But when i try to install php-oci8*.rpm, no matter which i use:
php-oci8-5.1.6-1.el5.i386.rpm or php-oci8-4.3.9-2.2.el4.i386.rpm
The installation always failed due to dependencies errors with oracle instant client.
I also tried with some other packages like: php-oci8-4.3.9-3.el4.x86_64.rpm
All my tries gave me dependency errors.
sometime like:
error: Failed dependencies:
libclntsh.so.10.1 is needed by php-oci8-5.1.6-1.el5.i386
oracle-instantclient = 10.2.0.3 is needed by
php-oci8-5.1.6-1.el5.i386And I cannt find the right RPM for oracle instant client for linux 64 bits box, and php-oci8 5.1.6 64 bits.
I have been trying on this problem for more than one week, and so frustrated. I will appreciate if I can be guide on this issue.
Thanks in advance!See my followup to your duplicate post in the PHP forum
Maybe you are looking for
-
Songs deleted off HD but still in iTunes library?
Maybe a stupid question but I figured it was worth asking. I have a bunch of songs that are not on my HD but still in the iTunes library, and my iPod is set to manual update because I'm scared of losing all my songs. The actual question is; if the so
-
Can I replace an older Airport Extreme with a newer one by importing configuration file
Can I import the configuration file from an older Airport base station into a newer replacement Airport base station? It would seem this would save me a lot of extra work. First, it would hopefully save time by automatically configuring the new bas
-
Hi. I also posted this in the Acrobat site:. Perhaps this might be a more appropriate location? Hello. I faced a really strange thing today. I created a report PDF through Xcelsius. In this PDF, I have a Flash button which, when clicked, would lin
-
Urgent: Batch Watermark or easy Watermark
hello, i have about 60 Quicktime Files, i need to know how i can take them and add a Watermark easily! Thank you!
-
Ideas for storing a specific utilisation %
We currently use both infotype 0008 Basic Pay, 0007 Planned Working time, and 0315 timesheet defaults. So we can tell what % of time people should work each week/month. We would like to store an additional target, of say 80% of time being booked to a