Search Results

Search found 642 results on 26 pages for 'ld so'.

Page 4/26 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • socket connection failed, telnet OK

    - by cf16
    my problem is that I can't connect two comps through socket (windows xp and windows7) although the server created with socket is listening and I can telnet it. It receives then information and does what should be done, but if I run the corresponding socket client I get error 10061. Moreover I am behind firewall - these two comps are running within my LAN, the windows firewalls are turned off, comp1: 192.168.1.2 port 12345 comp1: 192.168.1.6 port 12345 router: 192.168.1.1 Maybe port forwarding could help? But most important for me is to answer why Sockets fail if telnet works fine. client: int main(){ // Initialize Winsock. WSADATA wsaData; int iResult = WSAStartup(MAKEWORD(2,2), &wsaData); if (iResult != NO_ERROR) printf("Client: Error at WSAStartup().\n"); else printf("Client: WSAStartup() is OK.\n"); // Create a socket. SOCKET m_socket; m_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (m_socket == INVALID_SOCKET){ printf("Client: socket() - Error at socket(): %ld\n", WSAGetLastError()); WSACleanup(); return 7; }else printf("Client: socket() is OK.\n"); // Connect to a server. sockaddr_in clientService; clientService.sin_family = AF_INET; //clientService.sin_addr.s_addr = inet_addr("77.64.240.156"); clientService.sin_addr.s_addr = inet_addr("192.168.1.5"); //clientService.sin_addr.s_addr = inet_addr("87.207.222.5"); clientService.sin_port = htons(12345); if (connect(m_socket, (SOCKADDR*)&clientService, sizeof(clientService)) == SOCKET_ERROR){ printf("Client: connect() - Failed to connect.\n"); wprintf(L"connect function failed with error: %ld\n", WSAGetLastError()); iResult = closesocket(m_socket); if (iResult == SOCKET_ERROR) wprintf(L"closesocket function failed with error: %ld\n", WSAGetLastError()); WSACleanup(); return 6; } // Send and receive data int bytesSent; int bytesRecv = SOCKET_ERROR; // Be careful with the array bound, provide some checking mechanism char sendbuf[200] = "Client: Sending some test string to server..."; char recvbuf[200] = ""; bytesSent = send(m_socket, sendbuf, strlen(sendbuf), 0); printf("Client: send() - Bytes Sent: %ld\n", bytesSent); while(bytesRecv == SOCKET_ERROR){ bytesRecv = recv(m_socket, recvbuf, 32, 0); if (bytesRecv == 0 || bytesRecv == WSAECONNRESET){ printf("Client: Connection Closed.\n"); break; }else printf("Client: recv() is OK.\n"); if (bytesRecv < 0) return 0; else printf("Client: Bytes received - %ld.\n", bytesRecv); } system("pause"); return 0; } server: int main(){ WORD wVersionRequested; WSADATA wsaData={0}; int wsaerr; // Using MAKEWORD macro, Winsock version request 2.2 wVersionRequested = MAKEWORD(2, 2); wsaerr = WSAStartup(wVersionRequested, &wsaData); if (wsaerr != 0){ /* Tell the user that we could not find a usable WinSock DLL.*/ printf("Server: The Winsock dll not found!\n"); return 0; }else{ printf("Server: The Winsock dll found!\n"); printf("Server: The status: %s.\n", wsaData.szSystemStatus); } /* Confirm that the WinSock DLL supports 2.2.*/ /* Note that if the DLL supports versions greater */ /* than 2.2 in addition to 2.2, it will still return */ /* 2.2 in wVersion since that is the version we */ /* requested. */ if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2 ){ /* Tell the user that we could not find a usable WinSock DLL.*/ printf("Server: The dll do not support the Winsock version %u.%u!\n", LOBYTE(wsaData.wVersion), HIBYTE(wsaData.wVersion)); WSACleanup(); return 0; }else{ printf("Server: The dll supports the Winsock version %u.%u!\n", LOBYTE(wsaData.wVersion), HIBYTE(wsaData.wVersion)); printf("Server: The highest version this dll can support: %u.%u\n", LOBYTE(wsaData.wHighVersion), HIBYTE(wsaData.wHighVersion)); } //////////Create a socket//////////////////////// //Create a SOCKET object called m_socket. SOCKET m_socket; // Call the socket function and return its value to the m_socket variable. // For this application, use the Internet address family, streaming sockets, and the TCP/IP protocol. // using AF_INET family, TCP socket type and protocol of the AF_INET - IPv4 m_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); // Check for errors to ensure that the socket is a valid socket. if (m_socket == INVALID_SOCKET){ printf("Server: Error at socket(): %ld\n", WSAGetLastError()); WSACleanup(); //return 0; }else{ printf("Server: socket() is OK!\n"); } ////////////////bind////////////////////////////// // Create a sockaddr_in object and set its values. sockaddr_in service; // AF_INET is the Internet address family. service.sin_family = AF_INET; // "127.0.0.1" is the local IP address to which the socket will be bound. service.sin_addr.s_addr = htons(INADDR_ANY);//inet_addr("127.0.0.1");//htons(INADDR_ANY); //inet_addr("192.168.1.2"); // 55555 is the port number to which the socket will be bound. // using the htons for big-endian service.sin_port = htons(12345); // Call the bind function, passing the created socket and the sockaddr_in structure as parameters. // Check for general errors. if (bind(m_socket, (SOCKADDR*)&service, sizeof(service)) == SOCKET_ERROR){ printf("Server: bind() failed: %ld.\n", WSAGetLastError()); closesocket(m_socket); //return 0; }else{ printf("Server: bind() is OK!\n"); } // Call the listen function, passing the created socket and the maximum number of allowed // connections to accept as parameters. Check for general errors. if (listen(m_socket, 1) == SOCKET_ERROR) printf("Server: listen(): Error listening on socket %ld.\n", WSAGetLastError()); else{ printf("Server: listen() is OK, I'm waiting for connections...\n"); } // Create a temporary SOCKET object called AcceptSocket for accepting connections. SOCKET AcceptSocket; // Create a continuous loop that checks for connections requests. If a connection // request occurs, call the accept function to handle the request. printf("Server: Waiting for a client to connect...\n"); printf("***Hint: Server is ready...run your client program...***\n"); // Do some verification... while (1){ AcceptSocket = SOCKET_ERROR; while (AcceptSocket == SOCKET_ERROR){ AcceptSocket = accept(m_socket, NULL, NULL); } // else, accept the connection... note: now it is wrong implementation !!!!!!!! !! !! (only 1 char) // When the client connection has been accepted, transfer control from the // temporary socket to the original socket and stop checking for new connections. printf("Server: Client Connected! Mammamija. \n"); m_socket = AcceptSocket; char recvBuf[200]=""; char * rc=recvBuf; int bytesRecv=recv(m_socket,recvBuf,64,0); if(bytesRecv==0 || bytesRecv==WSAECONNRESET){ cout<<"server: connection closed.\n"; }else{ cout<<"server: recv() is OK.\n"; if(bytesRecv<0){ return 0; }else{ printf("server: bytes received: %ld.\n",recvBuf); } }

    Read the article

  • How to restrict user to a particular folder in CentOS 6?

    - by Chris Demetriad
    I will need to create users so developers can log in and clone/pull/push changes/repositories from a github like platform. I've managed to add a user (using the root) to this CentOS machine; I now have this line in /etc/passwd: chris:x:32008:32010::/home/chris/public_html:/bin/bash ..and this in /etc/shadow: chris:$1$ruUeLtTu$onAY2hdu1J.UmHajEIlmR.:15385:0:99999:7::: I am able to SSH the server, I have permission to create a folder and I guess that should be enough. But I am able to see other files and folders outside public_html. How can I actually restrict the user to a particular directory so he can't "cd out" of his folder? Update: root@echo [~]# ls -ld /home/moove drwx--x--x 21 moove moove 4096 Mar 22 16:16 /home/moove/ root@echo [~]# ls -ld /home/moove/public_html drwxr-x--- 11 moove nobody 4096 Mar 27 11:29 /home/moove/public_html/ root@echo [~]# ls -ld /home/moove/public_html/dev drwxr-x--- 12 moove nobody 4096 Mar 27 14:47 /home/moove/public_html/dev/ root@echo [~]# ls -ld /home/moove/public_html/dev/arsenal drwxr-xr-x 3 arsenal moove 4096 Mar 27 14:53 /home/moove/public_html/dev/arsenal/

    Read the article

  • Thread scheduling C

    - by MRP
    include <pthread.h> include <stdio.h> include <stdlib.h> #define NUM_THREADS 4 #define TCOUNT 5 #define COUNT_LIMIT 13 int done = 0; int count = 0; int thread_ids[4] = {0,1,2,3}; int thread_runtime[4] = {0,5,4,1}; pthread_mutex_t count_mutex; pthread_cond_t count_threshold_cv; void *inc_count(void *t) { int i; long my_id = (long)t; long run_time = thread_runtime[my_id]; if (my_id==2 && done ==0) { for(i=0; i< 5 ; i++) { if( i==4 ){done =1;} pthread_mutex_lock(&count_mutex); count++; if (count == COUNT_LIMIT) { pthread_cond_signal(&count_threshold_cv); printf("inc_count(): thread %ld, count = %d Threshold reached.\n", my_id, count); } printf("inc_count(): thread %ld, count = %d, unlocking mutex\n", my_id, count); pthread_mutex_unlock(&count_mutex); } } if (my_id==3 && done==1) { for(i=0; i< 4 ; i++) { if(i == 3 ){ done = 2;} pthread_mutex_lock(&count_mutex); count++; if (count == COUNT_LIMIT) { pthread_cond_signal(&count_threshold_cv); printf("inc_count(): thread %ld, count = %d Threshold reached.\n", my_id, count); } printf("inc_count(): thread %ld, count = %d, unlocking mutex\n", my_id, count); pthread_mutex_unlock(&count_mutex); } } if (my_id==4&& done == 2) { for(i=0; i< 8 ; i++) { pthread_mutex_lock(&count_mutex); count++; if (count == COUNT_LIMIT) { pthread_cond_signal(&count_threshold_cv); printf("inc_count(): thread %ld, count = %d Threshold reached.\n",my_id, count); } printf("inc_count(): thread %ld, count = %d, unlocking mutex\n", my_id, count); pthread_mutex_unlock(&count_mutex); } } pthread_exit(NULL); } void *watch_count(void *t) { long my_id = (long)t; printf("Starting watch_count(): thread %ld\n", my_id); pthread_mutex_lock(&count_mutex); if (count<COUNT_LIMIT) { pthread_cond_wait(&count_threshold_cv, &count_mutex); printf("watch_count(): thread %ld Condition signal received.\n", my_id); count += 125; printf("watch_count(): thread %ld count now = %d.\n", my_id, count); } pthread_mutex_unlock(&count_mutex); pthread_exit(NULL); } int main (int argc, char *argv[]) { int i, rc; long t1=1, t2=2, t3=3, t4=4; pthread_t threads[4]; pthread_attr_t attr; pthread_mutex_init(&count_mutex, NULL); pthread_cond_init (&count_threshold_cv, NULL); pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_JOINABLE); pthread_create(&threads[0], &attr, watch_count, (void *)t1); pthread_create(&threads[1], &attr, inc_count, (void *)t2); pthread_create(&threads[2], &attr, inc_count, (void *)t3); pthread_create(&threads[3], &attr, inc_count, (void *)t4); for (i=0; i<NUM_THREADS; i++) { pthread_join(threads[i], NULL); } printf ("Main(): Waited on %d threads. Done.\n", NUM_THREADS); pthread_attr_destroy(&attr); pthread_mutex_destroy(&count_mutex); pthread_cond_destroy(&count_threshold_cv); pthread_exit(NULL); } so this code creates 4 threads. thread 1 keeps track of the count value while the other 3 increment the count value. the run time is the number of times the thread will increment the count value. I have a done value that allows the first thread to increment the count value first until its run time is up.. so its like a First Come First Serve. my question is, is there a better way of implementing this? I have read about SCHED_FIFO or SCHED_RR.. I guess I dont know how to implement them into this code or if it can be.

    Read the article

  • Problems installing Memcache (PECL extension)

    - by Petrus
    I have installed memcached fine, and now I will need to install PECL extension memcache. Im running RedHat x86_64 es5. The installation gives me this: downloading memcache-2.2.6.tgz ... Starting to download memcache-2.2.6.tgz (35,957 bytes) ..........done: 35,957 bytes 11 source files, building running: phpize Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626 Enable memcache session handler support? [yes] : Notice: Use of undefined constant STDIN - assumed 'STDIN' in PEAR/Frontend/CLI.php on line 304 Warning: fgets() expects parameter 1 to be resource, string given in PEAR/Frontend/CLI.php on line 304 Warning: fgets() expects parameter 1 to be resource, string given in /usr/lib/php/PEAR/Frontend/CLI.php on line 304 building in /root/tmp/pear-build-root/memcache-2.2.6 running: /root/tmp/pear/memcache/configure --enable-memcache-session=yes checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking for cc... cc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ANSI C... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib checking for PHP extension directory... /usr/lib/php/extensions/no-debug-non-zts-20090626 checking for PHP installed headers prefix... /usr/include/php checking if debug is enabled... no checking if zts is enabled... no checking for re2c... re2c checking for re2c version... invalid configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking whether to enable memcache support... yes, shared checking whether to enable memcache session handler support... yes checking for the location of ZLIB... no checking for the location of zlib... /usr checking for session includes... /usr/include/php checking for memcache session support... enabled checking for ld used by cc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognize dependent libraries... pass_all checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking the maximum length of command line arguments... 98304 checking command to parse /usr/bin/nm -B output from cc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if cc supports -fno-rtti -fno-exceptions... no checking for cc option to produce PIC... -fPIC checking if cc PIC flag -fPIC works... yes checking if cc static flag -static works... yes checking if cc supports -c -o file.o... yes checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no creating libtool appending configuration tag "CXX" to libtool configure: creating ./config.status config.status: creating config.h running: make /bin/sh /root/tmp/pear-build-root/memcache-2.2.6/libtool --mode=compile cc -I/usr/include/php -I. -I/root/tmp/pear/memcache -DPHP_ATOM_INC -I/root/tmp/pear-build-root/memcache-2.2.6/include -I/root/tmp/pear-build-root/memcache-2.2.6/main -I/root/tmp/pear/memcache -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/memcache/memcache.c -o memcache.lo mkdir .libs cc -I/usr/include/php -I. -I/root/tmp/pear/memcache -DPHP_ATOM_INC -I/root/tmp/pear-build-root/memcache-2.2.6/include -I/root/tmp/pear-build-root/memcache-2.2.6/main -I/root/tmp/pear/memcache -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/memcache/memcache.c -fPIC -DPIC -o .libs/memcache.o /bin/sh /root/tmp/pear-build-root/memcache-2.2.6/libtool --mode=compile cc -I/usr/include/php -I. -I/root/tmp/pear/memcache -DPHP_ATOM_INC -I/root/tmp/pear-build-root/memcache-2.2.6/include -I/root/tmp/pear-build-root/memcache-2.2.6/main -I/root/tmp/pear/memcache -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/memcache/memcache_queue.c -o memcache_queue.lo cc -I/usr/include/php -I. -I/root/tmp/pear/memcache -DPHP_ATOM_INC -I/root/tmp/pear-build-root/memcache-2.2.6/include -I/root/tmp/pear-build-root/memcache-2.2.6/main -I/root/tmp/pear/memcache -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/memcache/memcache_queue.c -fPIC -DPIC -o .libs/memcache_queue.o /bin/sh /root/tmp/pear-build-root/memcache-2.2.6/libtool --mode=compile cc -I/usr/include/php -I. -I/root/tmp/pear/memcache -DPHP_ATOM_INC -I/root/tmp/pear-build-root/memcache-2.2.6/include -I/root/tmp/pear-build-root/memcache-2.2.6/main -I/root/tmp/pear/memcache -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/memcache/memcache_standard_hash.c -o memcache_standard_hash.lo cc -I/usr/include/php -I. -I/root/tmp/pear/memcache -DPHP_ATOM_INC -I/root/tmp/pear-build-root/memcache-2.2.6/include -I/root/tmp/pear-build-root/memcache-2.2.6/main -I/root/tmp/pear/memcache -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/memcache/memcache_standard_hash.c -fPIC -DPIC -o .libs/memcache_standard_hash.o /bin/sh /root/tmp/pear-build-root/memcache-2.2.6/libtool --mode=compile cc -I/usr/include/php -I. -I/root/tmp/pear/memcache -DPHP_ATOM_INC -I/root/tmp/pear-build-root/memcache-2.2.6/include -I/root/tmp/pear-build-root/memcache-2.2.6/main -I/root/tmp/pear/memcache -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/memcache/memcache_consistent_hash.c -o memcache_consistent_hash.lo cc -I/usr/include/php -I. -I/root/tmp/pear/memcache -DPHP_ATOM_INC -I/root/tmp/pear-build-root/memcache-2.2.6/include -I/root/tmp/pear-build-root/memcache-2.2.6/main -I/root/tmp/pear/memcache -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/memcache/memcache_consistent_hash.c -fPIC -DPIC -o .libs/memcache_consistent_hash.o /bin/sh /root/tmp/pear-build-root/memcache-2.2.6/libtool --mode=compile cc -I/usr/include/php -I. -I/root/tmp/pear/memcache -DPHP_ATOM_INC -I/root/tmp/pear-build-root/memcache-2.2.6/include -I/root/tmp/pear-build-root/memcache-2.2.6/main -I/root/tmp/pear/memcache -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/memcache/memcache_session.c -o memcache_session.lo cc -I/usr/include/php -I. -I/root/tmp/pear/memcache -DPHP_ATOM_INC -I/root/tmp/pear-build-root/memcache-2.2.6/include -I/root/tmp/pear-build-root/memcache-2.2.6/main -I/root/tmp/pear/memcache -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/memcache/memcache_session.c -fPIC -DPIC -o .libs/memcache_session.o /bin/sh /root/tmp/pear-build-root/memcache-2.2.6/libtool --mode=link cc -DPHP_ATOM_INC -I/root/tmp/pear-build-root/memcache-2.2.6/include -I/root/tmp/pear-build-root/memcache-2.2.6/main -I/root/tmp/pear/memcache -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -o memcache.la -export-dynamic -avoid-version -prefer-pic -module -rpath /root/tmp/pear-build-root/memcache-2.2.6/modules memcache.lo memcache_queue.lo memcache_standard_hash.lo memcache_consistent_hash.lo memcache_session.lo cc -shared .libs/memcache.o .libs/memcache_queue.o .libs/memcache_standard_hash.o .libs/memcache_consistent_hash.o .libs/memcache_session.o -Wl,-soname -Wl,memcache.so -o .libs/memcache.so creating memcache.la (cd .libs && rm -f memcache.la && ln -s ../memcache.la memcache.la) /bin/sh /root/tmp/pear-build-root/memcache-2.2.6/libtool --mode=install cp ./memcache.la /root/tmp/pear-build-root/memcache-2.2.6/modules cp ./.libs/memcache.so /root/tmp/pear-build-root/memcache-2.2.6/modules/memcache.so cp ./.libs/memcache.lai /root/tmp/pear-build-root/memcache-2.2.6/modules/memcache.la PATH="$PATH:/sbin" ldconfig -n /root/tmp/pear-build-root/memcache-2.2.6/modules ---------------------------------------------------------------------- Libraries have been installed in: /root/tmp/pear-build-root/memcache-2.2.6/modules If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- Build complete. Don't forget to run 'make test'. running: make INSTALL_ROOT="/root/tmp/pear-build-root/install-memcache-2.2.6" install Installing shared extensions: /root/tmp/pear-build-root/install-memcache-2.2.6/usr/lib/php/extensions/no-debug-non-zts-20090626/ running: find "/root/tmp/pear-build-root/install-memcache-2.2.6" | xargs ls -dils 361232 4 drwxr-xr-x 3 root root 4096 Jan 28 10:47 /root/tmp/pear-build-root/install-memcache-2.2.6 361263 4 drwxr-xr-x 3 root root 4096 Jan 28 10:47 /root/tmp/pear-build-root/install-memcache-2.2.6/usr 361264 4 drwxr-xr-x 3 root root 4096 Jan 28 10:47 /root/tmp/pear-build-root/install-memcache-2.2.6/usr/lib 361265 4 drwxr-xr-x 3 root root 4096 Jan 28 10:47 /root/tmp/pear-build-root/install-memcache-2.2.6/usr/lib/php 361266 4 drwxr-xr-x 3 root root 4096 Jan 28 10:47 /root/tmp/pear-build-root/install-memcache-2.2.6/usr/lib/php/extensions 361267 4 drwxr-xr-x 2 root root 4096 Jan 28 10:47 /root/tmp/pear-build-root/install-memcache-2.2.6/usr/lib/php/extensions/no-debug-non-zts-20090626 361262 236 -rwxr-xr-x 1 root root 235575 Jan 28 10:47 /root/tmp/pear-build-root/install-memcache-2.2.6/usr/lib/php/extensions/no-debug-non-zts-20090626/memcache.so Build process completed successfully Installing '/usr/lib/php/extensions/no-debug-non-zts-20090626/memcache.so' install ok: channel://pecl.php.net/memcache-2.2.6 Extension memcache enabled in php.ini The memcache.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20090626 I tried as well to install this extension "memcached 1.0.2 (PHP extension for interfacing with memcached via libmemcached library)" but it failed: downloading memcached-1.0.2.tgz ... Starting to download memcached-1.0.2.tgz (22,724 bytes) ........done: 22,724 bytes 4 source files, building running: phpize Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626 building in /root/tmp/pear-build-root/memcached-1.0.2 running: /root/tmp/pear/memcached/configure checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking for cc... cc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ANSI C... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib checking for PHP extension directory... /usr/lib/php/extensions/no-debug-non-zts-20090626 checking for PHP installed headers prefix... /usr/include/php checking if debug is enabled... no checking if zts is enabled... no checking for re2c... re2c checking for re2c version... invalid configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking whether to enable memcached support... yes, shared checking for libmemcached... yes, shared checking whether to enable memcached session handler support... yes checking whether to enable memcached igbinary serializer support... no checking for ZLIB... yes, shared checking for zlib location... /usr checking for session includes... /usr/include/php checking for memcached session support... enabled checking for memcached igbinary support... disabled checking for libmemcached location... configure: error: memcached support requires libmemcached. Use --with-libmemcached-dir= to specify the prefix where libmemcached headers and library are located ERROR: `/root/tmp/pear/memcached/configure' failed The memcached.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20090626 Is there a kind soul out there that can solve this puzzle?

    Read the article

  • xcode linker error on iPhone app (Only on simulator)

    - by RexOnRoids
    Im getting this linker error that won't let me compile. It only happens on the simulator. KEY POINTS: - Happens only in simulator - Similar to THIS question, but found no FRAMEWORK_SEARCH_PATHS in my .pbxproj file - Though my OS is 10.6.2, I had to build target 1.5 to avoid other linker errors - libxml2.dylib IS required and is in my Frameworks group - The other cited libraries I have never heard of. - Tried bringing in those other Libs under frameworks, didn't solve. Build SpaceTweet of project SpaceTweet with configuration Debug Ld build/Debug-iphonesimulator/SpaceTweet.app/SpaceTweet normal i386 cd "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)" setenv MACOSX_DEPLOYMENT_TARGET 10.5 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk "-L/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator" -L/Users/Scott/Desktop "-L/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/../../libYAJLIPhone-0" -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib -L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk/usr/lib -L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/lib "-F/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator" -filelist "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/SpaceTweet.build/Debug-iphonesimulator/SpaceTweet.build/Objects-normal/i386/SpaceTweet.LinkFileList" -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework CoreGraphics -framework AVFoundation -framework MessageUI -lYAJLIPhone -lxml2 -o "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator/SpaceTweet.app/SpaceTweet" ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libxml2.dylib, missing required architecture i386 in file ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libSystem.dylib, missing required architecture i386 in file ld: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libobjc.A.dylib, missing required architecture i386 in file collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 CLUE: Again, MY question is very similar to THIS SOLVED QUESTION except that in my case I did NOT find a FRAMEWORK_SEARCH_PATHS entry in the .pbxproj file in my project bundle and thus could not solve in the manner in which that question was solved.

    Read the article

  • iPhone app linker error on Snow Leopard (Only on simulator)

    - by RexOnRoids
    Im getting this linker error that won't let me compile. It only happens on the simulator. NOTE: - OSX 10.6.2 but had to use 10.5 as build target to avoid other linker errors - libxml2.dylib IS required and is in my Frameworks group - The other cited libraries I have never heard of. - Tried bringing in those other Libs under frameworks, didn't solve. Build SpaceTweet of project SpaceTweet with configuration Debug Ld build/Debug-iphonesimulator/SpaceTweet.app/SpaceTweet normal i386 cd "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)" setenv MACOSX_DEPLOYMENT_TARGET 10.5 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk "-L/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator" -L/Users/Scott/Desktop "-L/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/../../libYAJLIPhone-0" -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib -L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk/usr/lib -L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/lib "-F/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator" -filelist "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/SpaceTweet.build/Debug-iphonesimulator/SpaceTweet.build/Objects-normal/i386/SpaceTweet.LinkFileList" -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework CoreGraphics -framework AVFoundation -framework MessageUI -lYAJLIPhone -lxml2 -o "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator/SpaceTweet.app/SpaceTweet" ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libxml2.dylib, missing required architecture i386 in file ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libSystem.dylib, missing required architecture i386 in file ld: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libobjc.A.dylib, missing required architecture i386 in file collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

    Read the article

  • SCNetworkReachability compiling error

    - by user262325
    Hello everyone I try to compile Ercia Sadun's sample codes at: http://github.com/erica/iphone-3.0-cookbook-/tree/master/C13-Networking/14-Web%20Browser/ There is error report : warning: in /Users/interdev/iphone source code/Web Browser/Classes/SystemConfiguration.framework/SystemConfiguration, missing required architecture i386 in file Undefined symbols: "_SCNetworkReachabilityScheduleWithRunLoop", referenced from: +[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o "_SCNetworkReachabilityCreateWithAddress", referenced from: +[UIDevice(Reachability) hostAvailable:] in UIDevice-Reachability.o +[UIDevice(Reachability) pingReachabilityInternal] in UIDevice-Reachability.o "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from: +[UIDevice(Reachability) unscheduleReachabilityWatcher] in UIDevice-Reachability.o "_SCNetworkReachabilitySetCallback", referenced from: +[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o +[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o +[UIDevice(Reachability) unscheduleReachabilityWatcher] in UIDevice-Reachability.o "_SCNetworkReachabilityGetFlags", referenced from: +[UIDevice(Reachability) hostAvailable:] in UIDevice-Reachability.o +[UIDevice(Reachability) pingReachabilityInternal] in UIDevice-Reachability.o ld: symbol(s) not found collect2: ld returned 1 exit status "_SCNetworkReachabilityScheduleWithRunLoop", referenced from: +[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o "_SCNetworkReachabilityCreateWithAddress", referenced from: +[UIDevice(Reachability) hostAvailable:] in UIDevice-Reachability.o +[UIDevice(Reachability) pingReachabilityInternal] in UIDevice-Reachability.o "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from: +[UIDevice(Reachability) unscheduleReachabilityWatcher] in UIDevice-Reachability.o "_SCNetworkReachabilitySetCallback", referenced from: +[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o +[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o +[UIDevice(Reachability) unscheduleReachabilityWatcher] in UIDevice-Reachability.o "_SCNetworkReachabilityGetFlags", referenced from: +[UIDevice(Reachability) hostAvailable:] in UIDevice-Reachability.o +[UIDevice(Reachability) pingReachabilityInternal] in UIDevice-Reachability.o ld: symbol(s) not found collect2: ld returned 1 exit status Build failed (5 errors) even I add systemConfiguration.framework, it reported same error. Welcome any comment Thanks interdev

    Read the article

  • Mixed static and dynamic link on Mac OS

    - by barbaz
    I want to use gcc to produce a shared library, but i want to link some other libraries it depends on statically. Now to produce the "standard" dynamically linked output file i use gcc -dynamiclib *.o -lfoo -lbar -o outfile which would be gcc -shared *.o -lfoo -lbar -o outfile on for a binutils ld on a linux system. Now if i want libfoo and libbar to be linked statically, I can name the static libraries directly gcc -dynamiclib *.o /usr/lib/libfoo.a /usr/lib/libbar.a -o outfile however, that way i have to look for the library files myself. GNU binutils ld supports this: gcc -shared *.o -l:libfoo.a -l:libbar.a -o outfile but apple's ld doesnt. Is there a way to make apple's ld look for the static libraries himself? If not, is there another way that would avoid naming the exact location of the archives, e.g. producing an intermediate output file out of the object files requiring libfoo and libbar with the -static switch and linking that file together with the remaining objectfiles to create the dynamic object?

    Read the article

  • How to install SpatiaLite 3 on 12.04

    - by Terra
    1) sudo apt-get install libsqlite3-dev libgeos-dev 2) libspatialite-3.0.0-stable$ ./configure Result: configure: error: cannot find proj_api.h, bailing out checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for stdlib.h... (cached) yes checking stdio.h usability... yes checking stdio.h presence... yes checking for stdio.h... yes checking for string.h... (cached) yes checking for memory.h... (cached) yes checking math.h usability... yes checking math.h presence... yes checking for math.h... yes checking float.h usability... yes checking float.h presence... yes checking for float.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking for inttypes.h... (cached) yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stdint.h... (cached) yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for unistd.h... (cached) yes checking sqlite3.h usability... yes checking sqlite3.h presence... yes checking for sqlite3.h... yes checking sqlite3ext.h usability... yes checking sqlite3ext.h presence... yes checking for sqlite3ext.h... yes checking for g++... no checking for c++... no checking for gpp... no checking for aCC... no checking for CC... no checking for cxx... no checking for cc++... no checking for cl.exe... no checking for FCC... no checking for KCC... no checking for RCC... no checking for xlC_r... no checking for xlC... no checking whether we are using the GNU C++ compiler... no checking whether g++ accepts -g... no checking dependency style of g++... none checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking dependency style of gcc... (cached) gcc3 checking how to run the C preprocessor... gcc -E checking whether ln -s works... yes checking whether make sets $(MAKE)... (cached) yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking how to print strings... printf checking for a sed that does not truncate output... /bin/sed checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... dlltool checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for mt... mt checking if mt is a manifest tool... no checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for an ANSI C-conforming const... yes checking for off_t... yes checking for size_t... yes checking whether time.h and sys/time.h may both be included... yes checking whether struct tm is in sys/time.h or time.h... time.h checking for working volatile... yes checking whether lstat correctly handles trailing slash... yes checking whether lstat accepts an empty string... no checking whether lstat correctly handles trailing slash... (cached) yes checking for working memcmp... yes checking whether stat accepts an empty string... no checking for strftime... yes checking for memset... yes checking for sqrt... no checking for strcasecmp... yes checking for strerror... yes checking for strncasecmp... yes checking for strstr... yes checking for fdatasync... yes checking for ftruncate... yes checking for getcwd... yes checking for gettimeofday... yes checking for localtime_r... yes checking for memmove... yes checking for strerror... (cached) yes checking for sqlite3_prepare_v2 in -lsqlite3... yes checking for sqlite3_rtree_geometry_callback in -lsqlite3... yes checking proj_api.h usability... no checking proj_api.h presence... no checking for proj_api.h... no configure: error: cannot find proj_api.h, bailing out

    Read the article

  • How do I make a Mach-O binary from an object file?

    - by Mike
    I have an object file, which I'd like to make into a Mach-O binary(I'm on Mac OS 10.6). Running ld source.o produces the following output: Undefined symbols: "_printf", referenced from: _main in source.o ld: symbol(s) not found for inferred architecture x86_64 How can I reference libSystem(or whatever library includes printf) using ld?

    Read the article

  • Parent Objects

    - by Ali Bahrami
    Support for Parent Objects was added in Solaris 11 Update 1. The following material is adapted from the PSARC arc case, and the Solaris Linker and Libraries Manual. A "plugin" is a shared object, usually loaded via dlopen(), that is used by a program in order to allow the end user to add functionality to the program. Examples of plugins include those used by web browsers (flash, acrobat, etc), as well as mdb and elfedit modules. The object that loads the plugin at runtime is called the "parent object". Unlike most object dependencies, the parent is not identified by name, but by its status as the object doing the load. Historically, building a good plugin is has been more complicated than it should be: A parent and its plugin usually share a 2-way dependency: The plugin provides one or more routines for the parent to call, and the parent supplies support routines for use by the plugin for things like memory allocation and error reporting. It is a best practice to build all objects, including plugins, with the -z defs option, in order to ensure that the object specifies all of its dependencies, and is self contained. However: The parent is usually an executable, which cannot be linked to via the usual library mechanisms provided by the link editor. Even if the parent is a shared object, which could be a normal library dependency to the plugin, it may be desirable to build plugins that can be used by more than one parent, in which case embedding a dependency NEEDED entry for one of the parents is undesirable. The usual way to build a high quality plugin with -z defs uses a special mapfile provided by the parent. This mapfile defines the parent routines, specifying the PARENT attribute (see example below). This works, but is inconvenient, and error prone. The symbol table in the parent already describes what it makes available to plugins — ideally the plugin would obtain that information directly rather than from a separate mapfile. The new -z parent option to ld allows a plugin to link to the parent and access the parent symbol table. This differs from a typical dependency: No NEEDED record is created. The relationship is recorded as a logical connection to the parent, rather than as an explicit object name However, it operates in the same manner as any other dependency in terms of making symbols available to the plugin. When the -z parent option is used, the link-editor records the basename of the parent object in the dynamic section, using the new tag DT_SUNW_PARENT. This is an informational tag, which is not used by the runtime linker to locate the parent, but which is available for diagnostic purposes. The ld(1) manpage documentation for the -z parent option is: -z parent=object Specifies a "parent object", which can be an executable or shared object, against which to link the output object. This option is typically used when creating "plugin" shared objects intended to be loaded by an executable at runtime via the dlopen() function. The symbol table from the parent object is used to satisfy references from the plugin object. The use of the -z parent option makes symbols from the object calling dlopen() available to the plugin. Example For this example, we use a main program, and a plugin. The parent provides a function named parent_callback() for the plugin to call. The plugin provides a function named plugin_func() to the parent: % cat main.c #include <stdio.h> #include <dlfcn.h> #include <link.h> void parent_callback(void) { printf("plugin_func() has called parent_callback()\n"); } int main(int argc, char **argv) { typedef void plugin_func_t(void); void *hdl; plugin_func_t *plugin_func; if (argc != 2) { fprintf(stderr, "usage: main plugin\n"); return (1); } if ((hdl = dlopen(argv[1], RTLD_LAZY)) == NULL) { fprintf(stderr, "unable to load plugin: %s\n", dlerror()); return (1); } plugin_func = (plugin_func_t *) dlsym(hdl, "plugin_func"); if (plugin_func == NULL) { fprintf(stderr, "unable to find plugin_func: %s\n", dlerror()); return (1); } (*plugin_func)(); return (0); } % cat plugin.c #include <stdio.h> extern void parent_callback(void); void plugin_func(void) { printf("parent has called plugin_func() from plugin.so\n"); parent_callback(); } Building this in the traditional manner, without -zdefs: % cc -o main main.c % cc -G -o plugin.so plugin.c % ./main ./plugin.so parent has called plugin_func() from plugin.so plugin_func() has called parent_callback() As noted above, when building any shared object, the -z defs option is recommended, in order to ensure that the object is self contained and specifies all of its dependencies. However, the use of -z defs prevents the plugin object from linking due to the unsatisfied symbol from the parent object: % cc -zdefs -G -o plugin.so plugin.c Undefined first referenced symbol in file parent_callback plugin.o ld: fatal: symbol referencing errors. No output written to plugin.so A mapfile can be used to specify to ld that the parent_callback symbol is supplied by the parent object. % cat plugin.mapfile $mapfile_version 2 SYMBOL_SCOPE { global: parent_callback { FLAGS = PARENT }; }; % cc -zdefs -Mplugin.mapfile -G -o plugin.so plugin.c However, the -z parent option to ld is the most direct solution to this problem, allowing the plugin to actually link against the parent object, and obtain the available symbols from it. An added benefit of using -z parent instead of a mapfile, is that the name of the parent object is recorded in the dynamic section of the plugin, and can be displayed by the file utility: % cc -zdefs -zparent=main -G -o plugin.so plugin.c % elfdump -d plugin.so | grep PARENT [0] SUNW_PARENT 0xcc main % file plugin.so plugin.so: ELF 32-bit LSB dynamic lib 80386 Version 1, parent main, dynamically linked, not stripped % ./main ./plugin.so parent has called plugin_func() from plugin.so plugin_func() has called parent_callback() We can also observe this in elfedit plugins on Solaris systems running Solaris 11 Update 1 or newer: % file /usr/lib/elfedit/dyn.so /usr/lib/elfedit/dyn.so: ELF 32-bit LSB dynamic lib 80386 Version 1, parent elfedit, dynamically linked, not stripped, no debugging information available Related Other Work The GNU ld has an option named --just-symbols that can be used in a similar manner: --just-symbols=filename Read symbol names and their addresses from filename, but do not relocate it or include it in the output. This allows your output file to refer symbolically to absolute locations of memory defined in other programs. You may use this option more than once. -z parent is a higher level operation aimed specifically at simplifying the construction of high quality plugins. Although it employs the same operation, it differs from --just symbols in 2 significant ways: There can only be one parent. The parent is recorded in the created object, and can be displayed by 'file', or other similar tools.

    Read the article

  • Running ARM(EL) executables on ARM(HF) system - Missing Symlink to dynamic Loader?

    - by Uhli
    I am using an Ubuntu 12.10 (ARMHF) distribution on a panda board. I want to run applications compiled for ARMEL. It was not possible due to a changed dynamic loader location (https://wiki.linaro.org/OfficeofCTO/HardFloat/LinkerPathCallApr2012) I succeeded by creating the following symbolic link /lib/ld-linux.so.3 - /lib/ld-linuxarmhf.so.3 Is there a way to install a portability package instead? Is there a reason why this is not done by the distribution? Thanks in advance

    Read the article

  • Installing Tcl and Tix in OSX

    - by Nate
    Hello, I'm having trouble installing Tix on OSX the version of Tix I am using is 8.4.3. I try to install it by following the instructions in the README % ./configure % make % make install And iat the very start of make it gives me: xXpm.o tixUnixWm.o -L/Library/Frameworks/Tcl.framework -ltclstub8.5 -L/Library/Frameworks/Tk.framework -ltkstub8.5 ld: warning: in /Library/Frameworks/Tcl.framework/libtclstub8.5.a, missing required architecture x86_64 in file ld: warning: in /Library/Frameworks/Tk.framework/libtkstub8.5.a, missing required architecture x86_64 in file Undefined symbols: (A whole long list of things) at the very end ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [libTix8.4.3.dylib] Error 1 Edit: Here's all the errors in the middle.. ld: warning: in /Library/Frameworks/Tcl.framework/libtclstub8.5.a, missing required architecture x86_64 in file ld: warning: in /Library/Frameworks/Tk.framework/libtkstub8.5.a, missing required architecture x86_64 in file Undefined symbols: "_Tk_InitStubs", referenced from: _Tix_Init in tixInit.o "_Tcl_InitStubs", referenced from: _Tix_Init in tixInit.o "_tclStubsPtr", referenced from: _FreeParseOptions in tixClass.o _FreeParseOptions in tixClass.o _Tix_UninitializedClassCmd in tixClass.o _Tix_UninitializedClassCmd in tixClass.o _Tix_InstanceCmd in tixClass.o _Tix_InstanceCmd in tixClass.o _Tix_InstanceCmd in tixClass.o _Tix_InstanceCmd in tixClass.o _Tix_InstanceCmd in tixClass.o _Tix_InstanceCmd in tixClass.o _Tix_InstanceCmd in tixClass.o _Tix_InstanceCmd in tixClass.o _Tix_InstanceCmd in tixClass.o _Tix_InstanceCmd in tixClass.o _Tix_InstanceCmd in tixClass.o _Tix_CreateInstanceCmd in tixClass.o _SetupAttribute in tixClass.o _SetupAttribute in tixClass.o _SetupAttribute in tixClass.o _ClassTableDeleteProc in tixClass.o _CreateClassRecord in tixClass.o _InitClass in tixClass.o _InitClass in tixClass.o _InitClass in tixClass.o _InitClass in tixClass.o _InitClass in tixClass.o _InitClass in tixClass.o _InitClass in tixClass.o _InitClass in tixClass.o _Tix_ClassCmd in tixClass.o _EventProc in tixCmds.o _IdleHandler in tixCmds.o _MapEventProc in tixCmds.o _MapEventProc in tixCmds.o _Tix_GetDefaultCmd in tixCmds.o _Tix_GetDefaultCmd in tixCmds.o _Tix_TmpLineCmd in tixCmds.o _Tix_ParentWindow in tixCmds.o _Tix_ParentWindow in tixCmds.o _Tix_DoWhenMappedCmd in tixCmds.o _Tix_DoWhenMappedCmd in tixCmds.o _Tix_DoWhenMappedCmd in tixCmds.o _Tix_DoWhenIdleCmd in tixCmds.o _Tix_DoWhenIdleCmd in tixCmds.o _Tix_DoWhenIdleCmd in tixCmds.o _Tix_DoWhenIdleCmd in tixCmds.o _Tix_DoWhenIdleCmd in tixCmds.o _Tix_HandleOptionsCmd in tixCmds.o _Tix_HandleOptionsCmd in tixCmds.o _Tix_HandleOptionsCmd in tixCmds.o _Tix_HandleOptionsCmd in tixCmds.o _Tix_HandleOptionsCmd in tixCmds.o _Tix_HandleOptionsCmd in tixCmds.o _Tix_HandleOptionsCmd in tixCmds.o _Tix_HandleOptionsCmd in tixCmds.o _Tix_Get3DBorderCmd in tixCmds.o _Tix_Get3DBorderCmd in tixCmds.o _Tix_Get3DBorderCmd in tixCmds.o _tixStrDup in tixCompat.o _Tix_ArgcError in tixError.o _Tix_ValueMissingError in tixError.o _Tix_UnknownPublicMethodError in tixError.o _FreeClientStruct in tixGeometry.o _StructureProc in tixGeometry.o _StructureProc in tixGeometry.o _Tix_ManageGeometryCmd in tixGeometry.o _Tix_ManageGeometryCmd in tixGeometry.o _Tix_ManageGeometryCmd in tixGeometry.o _GeoLostSlaveProc in tixGeometry.o _GeoLostSlaveProc in tixGeometry.o _GeoReqProc in tixGeometry.o _Tix_SafeInit in tixInit.o _Tix_Init in tixInit.o _Tix_GetContext in tixMethod.o _Tix_SuperClass in tixMethod.o _Tix_FindConfigSpecByName in tixOption.o _Tix_ChangeOptions in tixOption.o _Tix_QueryOneOption in tixOption.o _Tix_GetVar in tixOption.o _Tix_SetScrollBarView in tixScroll.o _Tix_SetScrollBarView in tixScroll.o _Tix_UpdateScrollBar in tixScroll.o _Tix_CreateCommands in tixUtils.o _Tix_CreateCommands in tixUtils.o _DeleteHashTableProc in tixUtils.o _TixGetHashTable in tixUtils.o _Tix_SetRcFileName in tixUtils.o _Tix_CreateSubWindow in tixUtils.o _ReliefParseProc in tixUtils.o _Tix_HandleSubCmds in tixUtils.o _Tix_HandleSubCmds in tixUtils.o _Tix_HandleSubCmds in tixUtils.o _Tix_ZAlloc in tixUtils.o _Tix_GlobalVarEval in tixUtils.o _Tix_Exit in tixUtils.o _Tix_Exit in tixUtils.o _Tix_CreateWidgetCmd in tixWidget.o _Tix_CreateWidgetCmd in tixWidget.o _Tix_GrSelModify in tixGrSel.o _Tix_GrFreeSortItems in tixGrSort.o _SortCompareProc in tixGrSort.o _SortCompareProc in tixGrSort.o _SortCompareProc in tixGrSort.o _Tix_GrGetSortItems in tixGrSort.o _Tix_GrSort in tixGrSort.o _Tix_GrSort in tixGrSort.o _Tix_GrSort in tixGrSort.o _Tix_GrSort in tixGrSort.o _Tix_GrSort in tixGrSort.o _Tix_GrSort in tixGrSort.o _Tix_GrSort in tixGrSort.o _Tix_GrSort in tixGrSort.o _Tix_GrSort in tixGrSort.o _Tix_GrSort in tixGrSort.o _Tix_GetChars in tixGrUtl.o _Tix_GrConfigSize in tixGrUtl.o _Tix_GrConfigSize in tixGrUtl.o _Tix_GrConfigSize in tixGrUtl.o _Tix_GrConfigSize in tixGrUtl.o _Tix_HLCancelResizeWhenIdle in tixHList.o _Tix_HLFindElement in tixHList.o _CurSelection in tixHList.o _Tix_HLGeometryInfo in tixHList.o _Tix_HLGeometryInfo in tixHList.o _Tix_HLGeometryInfo in tixHList.o _UpdateOneScrollBar in tixHList.o _AllocElement in tixHList.o _WidgetCommand in tixHList.o _Tix_HLEntryCget in tixHList.o _Tix_HLResizeWhenIdle in tixHList.o _Tix_HLResizeWhenIdle in tixHList.o _NewElement in tixHList.o _NewElement in tixHList.o _NewElement in tixHList.o _NewElement in tixHList.o _NewElement in tixHList.o _NewElement in tixHList.o _NewElement in tixHList.o _NewElement in tixHList.o _NewElement in tixHList.o _NewElement in tixHList.o _NewElement in tixHList.o _NewElement in tixHList.o _NewElement in tixHList.o _NewElement in tixHList.o _WidgetConfigure in tixHList.o _WidgetConfigure in tixHList.o _Tix_HListCmd in tixHList.o _Tix_HListCmd in tixHList.o _Tix_HListCmd in tixHList.o _Tix_HListCmd in tixHList.o _Tix_HListCmd in tixHList.o _UpdateScrollBars in tixHList.o _FreeElement in tixHList.o _FreeElement in tixHList.o _Tix_HLDelete in tixHList.o _Tix_HLDelete in tixHList.o _WidgetDestroy in tixHList.o _WidgetDestroy in tixHList.o _Tix_HLXView in tixHList.o _Tix_HLXView in tixHList.o _Tix_HLXView in tixHList.o _Tix_HLXView in tixHList.o _Tix_HLXView in tixHList.o _Tix_HLSetSite in tixHList.o _Tix_HLSetSite in tixHList.o _Tix_HLSetSite in tixHList.o _ConfigElement in tixHList.o _Tix_HLAddChild in tixHList.o _Tix_HLAdd in tixHList.o _Tix_HLComputeGeometry in tixHList.o _Tix_HLResizeNow in tixHList.o _Tix_HLNearest in tixHList.o _SubWindowEventProc in tixHList.o _WidgetEventProc in tixHList.o _WidgetEventProc in tixHList.o _WidgetEventProc in tixHList.o _WidgetEventProc in tixHList.o _Tix_HLItemInfo in tixHList.o _Tix_HLItemInfo in tixHList.o _Tix_HLItemInfo in tixHList.o _Tix_HLItemInfo in tixHList.o _Tix_HLItemInfo in tixHList.o _Tix_HLItemInfo in tixHList.o _Tix_HLItemInfo in tixHList.o _Tix_HLItemInfo in tixHList.o _Tix_HLItemInfo in tixHList.o _Tix_HLItemInfo in tixHList.o _Tix_HLSelection in tixHList.o _Tix_HLSelection in tixHList.o _Tix_HLSelection in tixHList.o _Tix_HLSelection in tixHList.o _Tix_HLYView in tixHList.o _Tix_HLYView in tixHList.o _Tix_HLYView in tixHList.o _Tix_HLSeeElement in tixHList.o _WidgetDisplay in tixHList.o _WidgetDisplay in tixHList.o _WidgetDisplay in tixHList.o _Tix_HLSee in tixHList.o _Tix_HLInfo in tixHList.o _Tix_HLInfo in tixHList.o _Tix_HLInfo in tixHList.o _Tix_HLInfo in tixHList.o _Tix_HLInfo in tixHList.o _Tix_HLInfo in tixHList.o _Tix_HLAllocColumn in tixHLCol.o _Tix_HLColWidth in tixHLCol.o _Tix_HLColWidth in tixHLCol.o _Tix_HLColWidth in tixHLCol.o _Tix_HLColWidth in tixHLCol.o _Tix_HLGetColumn in tixHLCol.o _Tix_HLGetColumn in tixHLCol.o _Tix_HLGetColumn in tixHLCol.o _Tix_HLItemExists in tixHLCol.o _Tix_HLItemExists in tixHLCol.o _Tix_HLItemDelete in tixHLCol.o _Tix_HLItemCreate in tixHLCol.o _Tix_HLIndExists in tixHLInd.o _Tix_HLIndExists in tixHLInd.o _Tix_HLIndCGet in tixHLInd.o _Tix_HLIndSize in tixHLInd.o _Tix_HLIndSize in tixHLInd.o _Tix_HLIndDelete in tixHLInd.o _Tix_HLIndCreate in tixHLInd.o _Tix_HLIndConfig in tixHLInd.o _Tix_HLGetHeader in tixHLHdr.o _Tix_HLCreateHeaders in tixHLHdr.o _Tix_HLCreateHeaders in tixHLHdr.o _Tix_HLHdrExist in tixHLHdr.o _Tix_HLHdrExist in tixHLHdr.o _Tix_HLHdrSize in tixHLHdr.o _Tix_HLHdrSize in tixHLHdr.o _Tix_HLFreeHeaders in tixHLHdr.o _Tix_HLHdrCreate in tixHLHdr.o _DeleteTab in tixNBFrame.o _DeleteTab in tixNBFrame.o _WidgetDestroy in tixNBFrame.o _FindTab in tixNBFrame.o _ImageProc in tixNBFrame.o _TabConfigure in tixNBFrame.o _WidgetEventProc in tixNBFrame.o _WidgetEventProc in tixNBFrame.o _WidgetEventProc in tixNBFrame.o _WidgetConfigure in tixNBFrame.o _Tix_NoteBookFrameCmd in tixNBFrame.o _Tix_NoteBookFrameCmd in tixNBFrame.o _Tix_NoteBookFrameCmd in tixNBFrame.o _Tix_NoteBookFrameCmd in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _ResizeWhenIdle in tixTList.o _ResizeWhenIdle in tixTList.o _WidgetConfigure in tixTList.o _WidgetConfigure in tixTList.o _Tix_TListCmd in tixTList.o _Tix_TListCmd in tixTList.o _UpdateScrollBars in tixTList.o _WidgetCommand in tixTList.o _Tix_TLGeometryInfo in tixTList.o _Tix_TLGeometryInfo in tixTList.o _Tix_TLGeometryInfo in tixTList.o _Tix_TLSpecialEntryInfo in tixTList.o _Tix_TLSpecialEntryInfo in tixTList.o _Tix_TLSpecialEntryInfo in tixTList.o _FreeEntry in tixTList.o _WidgetComputeGeometry in tixTList.o _WidgetComputeGeometry in tixTList.o _WidgetComputeGeometry in tixTList.o _Tix_TLGetNearest in tixTList.o _Tix_TranslateIndex in tixTList.o _Tix_TLEntryCget in tixTList.o _WidgetDestroy in tixTList.o _WidgetDestroy in tixTList.o _Tix_TLGetNeighbor in tixTList.o _Tix_TLGetNeighbor in tixTList.o _Tix_TLInfo in tixTList.o _Tix_TLInfo in tixTList.o _Tix_TLInfo in tixTList.o _Tix_TLInfo in tixTList.o _Tix_TLIndex in tixTList.o _Tix_TLNearest in tixTList.o _WidgetEventProc in tixTList.o _WidgetEventProc in tixTList.o _WidgetEventProc in tixTList.o _ConfigElement in tixTList.o _Tix_TLEntryConfig in tixTList.o _Tix_TLInsert in tixTList.o _Tix_TLInsert in tixTList.o _Tix_TLInsert in tixTList.o _Tix_TLView in tixTList.o _Tix_TLView in tixTList.o _Tix_TLSetSite in tixTList.o _Tix_TLSetSite in tixTList.o _Tix_TLSetSite in tixTList.o _Tix_TLSee in tixTList.o _Tix_TLSee in tixTList.o _Tix_TLSelection in tixTList.o _Tix_TLSelection in tixTList.o _Tix_TLSelection in tixTList.o _Tix_TLSelection in tixTList.o _ImgCmpGet in tixImgCmp.o _FreeLine in tixImgCmp.o _AddNewLine in tixImgCmp.o _FreeItem in tixImgCmp.o _AddNewText in tixImgCmp.o _AddNewSpace in tixImgCmp.o _AddNewImage in tixImgCmp.o _AddNewBitmap in tixImgCmp.o _ImgCmpFreeResources in tixImgCmp.o _ImgCmpDelete in tixImgCmp.o _ImgCmpConfigureMaster in tixImgCmp.o _ImgCmpConfigureMaster in tixImgCmp.o _ImgCmpConfigureMaster in tixImgCmp.o _ImgCmpCmd in tixImgCmp.o _ImgCmpCmd in tixImgCmp.o _ImgCmpCmd in tixImgCmp.o _ImgCmpCmd in tixImgCmp.o _ImgCmpCmd in tixImgCmp.o _ImgCmpCmd in tixImgCmp.o _ImgCmpCmd in tixImgCmp.o _ImgCmpCreate in tixImgCmp.o _ImgCmpCreate in tixImgCmp.o _ImageProc in tixImgCmp.o _ImgXpmDelete in tixImgXpm.o _ImgXpmDelete in tixImgXpm.o _Tix_DefinePixmap in tixImgXpm.o _Tix_DefinePixmap in tixImgXpm.o _ImgXpmFree in tixImgXpm.o _ImgXpmFree in tixImgXpm.o _ImgXpmGetDataFromString in tixImgXpm.o _ImgXpmGetDataFromString in tixImgXpm.o _ImgXpmConfigureInstance in tixImgXpm.o _ImgXpmConfigureInstance in tixImgXpm.o _ImgXpmConfigureInstance in tixImgXpm.o _ImgXpmConfigureInstance in tixImgXpm.o _ImgXpmConfigureInstance in tixImgXpm.o _ImgXpmConfigureInstance in tixImgXpm.o _ImgXpmConfigureInstance in tixImgXpm.o _ImgXpmConfigureInstance in tixImgXpm.o _ImgXpmGet in tixImgXpm.o _ImgXpmConfigureMaster in tixImgXpm.o _ImgXpmConfigureMaster in tixImgXpm.o _ImgXpmConfigureMaster in tixImgXpm.o _ImgXpmConfigureMaster in tixImgXpm.o _ImgXpmConfigureMaster in tixImgXpm.o _ImgXpmConfigureMaster in tixImgXpm.o _ImgXpmConfigureMaster in tixImgXpm.o _ImgXpmCmd in tixImgXpm.o _ImgXpmCmd in tixImgXpm.o _ImgXpmCmd in tixImgXpm.o _ImgXpmCmd in tixImgXpm.o _ImgXpmCreate in tixImgXpm.o _ImgXpmCreate in tixImgXpm.o _TixpInitPixmapInstance in tixUnixXpm.o _TixpXpmAllocTmpBuffer in tixUnixXpm.o _TixpXpmAllocTmpBuffer in tixUnixXpm.o _TixpXpmFreeTmpBuffer in tixUnixXpm.o _TixpXpmFreeTmpBuffer in tixUnixXpm.o _TixpXpmFreeInstanceData in tixUnixXpm.o "_tclIntStubsPtr", referenced from: _Tix_CreateWidgetCmd in tixWidget.o "_tkIntStubsPtr", referenced from: _XLowerWindow in tixUnixWm.o "_tkIntXlibStubsPtr", referenced from: _IdleHandler in tixGrid.o _IdleHandler in tixGrid.o _IdleHandler in tixGrid.o _Tix_GrFormatGrid in tixGrFmt.o _Tix_GrFormatGrid in tixGrFmt.o _Tix_GrFormatGrid in tixGrFmt.o _Tix_GrFormatGrid in tixGrFmt.o _DrawElements in tixHList.o _DrawElements in tixHList.o _DrawElements in tixHList.o _WidgetDisplay in tixHList.o _WidgetDisplay in tixHList.o _WidgetDisplay in tixHList.o _WidgetDisplay in tixHList.o _Tix_HLDrawHeader in tixHLHdr.o _Tix_HLDrawHeader in tixHLHdr.o _WidgetDisplay in tixNBFrame.o _Tix_TextStyleSetTemplate in tixDiText.o _Tix_TextStyleSetTemplate in tixDiText.o _Tix_TextItemFree in tixDiText.o _Tix_TextItemConfigure in tixDiText.o _Tix_WindowItemUnmap in tixDiWin.o _Tix_WindowItemUnmap in tixDiWin.o _Tix_WindowStyleFree in tixDiWin.o _Tix_WindowStyleConfigure in tixDiWin.o _Tix_WindowStyleSetTemplate in tixDiWin.o _Tix_WindowStyleSetTemplate in tixDiWin.o _Tix_WindowStyleSetTemplate in tixDiWin.o _Tix_WindowStyleSetTemplate in tixDiWin.o _Tix_WindowItemFree in tixDiWin.o _Tix_WindowItemFree in tixDiWin.o _Tix_WindowItemDisplay in tixDiWin.o _Tix_WindowItemDisplay in tixDiWin.o _Tix_WindowItemDisplay in tixDiWin.o _Tix_WindowItemDisplay in tixDiWin.o _Tix_WindowItemConfigure in tixDiWin.o _SubWindowLostSlaveProc in tixDiWin.o _UnmapClient in tixForm.o _UnmapClient in tixForm.o _TixFm_AddToMaster in tixForm.o _TixFm_GetFormInfo in tixForm.o _TixFm_FindClientPtrByName in tixForm.o _GetMasterInfo in tixForm.o _TixFm_Check in tixForm.o _TixFm_Slaves in tixForm.o _ArrangeGeometry in tixForm.o _ArrangeGeometry in tixForm.o _ArrangeGeometry in tixForm.o _TixFm_SetClient in tixForm.o _TixFm_SetClient in tixForm.o _TixFm_SetClient in tixForm.o _TixFm_SetClient in tixForm.o _TixFm_Spring in tixForm.o _TixFm_SetGrid in tixForm.o _TixFm_LostSlaveProc in tixForm.o _TixFm_ForgetOneClient in tixForm.o _TixFm_DeleteMaster in tixForm.o _ConfigureAttachment in tixFormMisc.o _ConfigureAttachment in tixFormMisc.o _ConfigureAttachment in tixFormMisc.o _ConfigureAttachment in tixFormMisc.o _TixFm_Configure in tixFormMisc.o _TixFm_Configure in tixFormMisc.o _TixFm_Configure in tixFormMisc.o _TixFm_Configure in tixFormMisc.o _TixFm_Configure in tixFormMisc.o _TixFm_Configure in tixFormMisc.o _WidgetCmdDeletedProc in tixGrid.o _Tix_GrCGet in tixGrid.o _WidgetDestroy in tixGrid.o _WidgetDestroy in tixGrid.o _WidgetConfigure in tixGrid.o _Tix_GrConfig in tixGrid.o _Tix_GrConfig in tixGrid.o _Tix_GridCmd in tixGrid.o _Tix_GrView in tixGrid.o _IdleHandler in tixGrid.o _IdleHandler in tixGrid.o _IdleHandler in tixGrid.o _IdleHandler in tixGrid.o _IdleHandler in tixGrid.o _IdleHandler in tixGrid.o _Tix_GrFillCells in tixGrFmt.o _Tix_GrFillCells in tixGrFmt.o _Tix_GrFreeUnusedColors in tixGrFmt.o _Tix_GrFreeUnusedColors in tixGrFmt.o _GetInfo in tixGrFmt.o _Tix_GrSaveColor in tixGrFmt.o _Tix_GrFormatGrid in tixGrFmt.o _Tix_GrFormatGrid in tixGrFmt.o _Tix_GrFormatBorder in tixGrFmt.o _Tix_GrConfigSize in tixGrUtl.o _Tix_GrConfigSize in tixGrUtl.o _Tix_GrConfigSize in tixGrUtl.o _Tix_HLCGet in tixHList.o _WidgetCmdDeletedProc in tixHList.o _DrawElements in tixHList.o _DrawElements in tixHList.o _DrawElements in tixHList.o _WidgetConfigure in tixHList.o _Tix_HLConfig in tixHList.o _Tix_HLConfig in tixHList.o _Tix_HListCmd in tixHList.o _WidgetDestroy in tixHList.o _WidgetDestroy in tixHList.o _Tix_HLXView in tixHList.o _Tix_HLComputeGeometry in tixHList.o _Tix_HLYView in tixHList.o _WidgetDisplay in tixHList.o _WidgetDisplay in tixHList.o _WidgetDisplay in tixHList.o _WidgetDisplay in tixHList.o _WidgetDisplay in tixHList.o _WidgetDisplay in tixHList.o _WidgetDisplay in tixHList.o _WidgetDisplay in tixHList.o _Tix_HLColWidth in tixHLCol.o _Tix_HLItemCGet in tixHLCol.o _Tix_HLItemConfig in tixHLCol.o _Tix_HLItemConfig in tixHLCol.o _Tix_HLIndCGet in tixHLInd.o _Tix_HLIndConfig in tixHLInd.o _Tix_HLIndConfig in tixHLInd.o _Tix_HLCreateHeaders in tixHLHdr.o _Tix_HLFreeHeaders in tixHLHdr.o _Tix_HLDrawHeader in tixHLHdr.o _Tix_HLDrawHeader in tixHLHdr.o _WidgetCmdDeletedProc in tixNBFrame.o _DeleteTab in tixNBFrame.o _DeleteTab in tixNBFrame.o _WidgetDestroy in tixNBFrame.o _WidgetDestroy in tixNBFrame.o _WidgetComputeGeometry in tixNBFrame.o _WidgetDisplay in tixNBFrame.o _WidgetDisplay in tixNBFrame.o _WidgetDisplay in tixNBFrame.o _WidgetDisplay in tixNBFrame.o _WidgetDisplay in tixNBFrame.o _WidgetDisplay in tixNBFrame.o _WidgetDisplay in tixNBFrame.o _TabConfigure in tixNBFrame.o _WidgetConfigure in tixNBFrame.o _Tix_NoteBookFrameCmd in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCommand in tixNBFrame.o _WidgetCmdDeletedProc in tixTList.o _Tix_TLCGet in tixTList.o _WidgetConfigure in tixTList.o _Tix_TLConfig in tixTList.o _Tix_TLConfig in tixTList.o _Tix_TListCmd in tixTList.o _Tix_TListCmd in tixTList.o _Tix_TListCmd in tixTList.o _Tix_TListCmd in tixTList.o _WidgetDisplay in tixTList.o _WidgetDisplay in tixTList.o _WidgetDisplay in tixTList.o _WidgetDisplay in tixTList.o _WidgetDisplay in tixTList.o _FreeEntry in tixTList.o _WidgetDestroy in tixTList.o _WidgetDestroy in tixTList.o _ImgCmpGet in tixImgCmp.o _FreeLine in tixImgCmp.o _AddNewLine in tixImgCmp.o _FreeItem in tixImgCmp.o _FreeItem in tixImgCmp.o _FreeItem in tixImgCmp.o _FreeItem in tixImgCmp.o _FreeItem in tixImgCmp.o _FreeItem in tixImgCmp.o _FreeItem in tixImgCmp.o _AddNewText in tixImgCmp.o _AddNewSpace in tixImgCmp.o _AddNewImage in tixImgCmp.o _AddNewBitmap in tixImgCmp.o _ImgCmpFreeResources in tixImgCmp.o _ImgCmpFreeResources in tixImgCmp.o _ImgCmpFreeResources in tixImgCmp.o _ImgCmpCmdDeletedProc in tixImgCmp.o _CalculateMasterSize in tixImgCmp.o _ImgCmpDisplay in tixImgCmp.o _ImgCmpDisplay in tixImgCmp.o _ImgCmpConfigureMaster in tixImgCmp.o _ImgCmpConfigureMaster in tixImgCmp.o _ImgCmpCmd in tixImgCmp.o _ImgCmpCmd in tixImgCmp.o _ImgCmpCmd in tixImgCmp.o _ImgXpmDelete in tixImgXpm.o _ImgXpmCmdDeletedProc in tixImgXpm.o _ImgXpmFree in tixImgXpm.o _ImgXpmFree in tixImgXpm.o _ImgXpmConfigureInstance in tixImgXpm.o _ImgXpmConfigureInstance in tixImgXpm.o _ImgXpmConfigureInstance in tixImgXpm.o _ImgXpmConfigureInstance in tixImgXpm.o _ImgXpmConfigureInstance in tixImgXpm.o _ImgXpmGet in tixImgXpm.o _ImgXpmGet in tixImgXpm.o _ImgXpmConfigureMaster in tixImgXpm.o _ImgXpmConfigureMaster in tixImgXpm.o _ImgXpmConfigureMaster in tixImgXpm.o _ImgXpmCmd in tixImgXpm.o _ImgXpmCmd in tixImgXpm.o _ImgXpmCmd in tixImgXpm.o _TixpDrawTmpLine in tixUnixDraw.o _TixpStartSubRegionDraw in tixUnixDraw.o _TixpEndSubRegionDraw in tixUnixDraw.o _TixpSubRegDrawImage in tixUnixDraw.o _TixpSubRegDrawImage in tixUnixDraw.o _TixpXpmRealizePixmap in tixUnixXpm.o _TixpXpmRealizePixmap in tixUnixXpm.o _TixpXpmRealizePixmap in tixUnixXpm.o _TixpXpmRealizePixmap in tixUnixXpm.o _TixpXpmRealizePixmap in tixUnixXpm.o _TixpXpmFreeInstanceData in tixUnixXpm.o _TixpXpmFreeInstanceData in tixUnixXpm.o ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [libTix8.4.3.dylib] Error 1 Thanks -N

    Read the article

  • Need Help getting perl module DBD::mysql installed for bugzilla on RedHat.

    - by Alos Diallo
    Hi everyone I am having some issues getting Bugzilla setup, I have the software on the server and am trying to get the pre-rec's setup. I am using RedHat 4.1.2-42. I have all of the required perl modules save one:DBD::mysql When I try: sudo perl install-module.pl DBD::mysql I get the following response(this is only an excerpt): rm -f blib/arch/auto/DBD/mysql/mysql.so LD_RUN_PATH="/usr/lib64/mysql:/usr/lib64:/lib64" /usr/bin/perl myld gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so \ -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib64 -lssl -lcrypto \ /usr/bin/ld: skipping incompatible /usr/lib/libssl.so when searching for -lssl /usr/bin/ld: skipping incompatible /usr/lib/libssl.a when searching for -lssl /usr/bin/ld: cannot find -lssl collect2: ld returned 1 exit status make: * [blib/arch/auto/DBD/mysql/mysql.so] Error 1 /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible I then tried the following: CFLAGS="-I/usr/lib64/mysql:/usr/lib64:/lib64" perl install-module.pl DBD::mysql I get the same result. I have also tried to install it using CPAN but also get the same result. Right now I have DBD-mysql v3.0007 but need (v4.00) Also when I try to install open ssl it says I have the latest version. Does anyone know what I have to do to get this to work? Any help would be greatly appreciated. Thank you

    Read the article

  • how to setup .ssh directory inside an encrypted volume on Mac OSX and still have public key logins?

    - by Vitaly Kushner
    I have my .ssh directory inside an encrypted sparse image. i.e. ~/.ssh is a symlink to /Volumes/VolumeName/.ssh The problem is that when I try to ssh into that machine using a public key I see the following error message in /var/log/secure.log: Authentication refused: bad ownership or modes for directory /Volumes Any way to solve this in a clean way? Update: The permissions on ~/.ssh and authorized_keys are right: > ls -ld ~ drwxr-xr-x+ 77 vitaly staff 2618 Mar 16 08:22 /Users/vitaly/ > ls -l ~/.ssh lrwxr-xr-x 1 vitaly staff 22 Mar 15 23:48 /Users/vitaly/.ssh@ -> /Volumes/Astrails/.ssh > ls -ld /Volumes/Astrails/.ssh drwx------ 3 vitaly staff 646 Mar 15 23:46 /Volumes/Astrails/.ssh/ > ls -ld /Volumes/Astrails/ drwx--x--x@ 18 vitaly staff 1360 Jan 12 22:05 /Volumes/Astrails// > ls -ld /Volumes/ drwxrwxrwt@ 5 root admin 170 Mar 15 20:38 /Volumes// error message sats the problem is with /Volumes, but I don't see the problem. Yes it is o+w but it is also +t which should be ok but apparently isn't. The problem is I can't change /Volumes permissions (or rather shouldn't) but I do want public key login to work. First I thought of mounting the image on other place then /Volumes, but it is automaunted on login by standard OSX mounting. I asked about it here: How to change disk image's default mount directory on osx The only answer I got is "you can't" ;) I could hack my way around, by writing some shellscript that will manually mounting volume at a non-standard location but it would be a gross hack, I'm still looking for a cleaner way to do what I need.

    Read the article

  • Why won't xattr PECL extension build on 12.10?

    - by Dan Jones
    I was using the xattr pecl extension in 12.04 (in fact, I think since 10.04) without problem. Not surprisingly, I had to reinstall it after upgrading to 12.10 because of the new version of PHP. But now it fails to build, and I can't figure out why. Other PECL extensions have built fine. And I have libattr1 and libattr1-dev installed. Here's the output from the build: downloading xattr-1.1.0.tgz ... Starting to download xattr-1.1.0.tgz (5,204 bytes) .....done: 5,204 bytes 3 source files, building running: phpize Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525 libattr library installation dir? [autodetect] : building in /tmp/pear/temp/pear-build-rootdSMx0G/xattr-1.1.0 running: /tmp/pear/temp/xattr/configure --with-xattr checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for a sed that does not truncate output... /bin/sed checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib checking for PHP extension directory... /usr/lib/php5/20100525 checking for PHP installed headers prefix... /usr/include/php5 checking if debug is enabled... no checking if zts is enabled... no checking for re2c... re2c checking for re2c version... 0.13.5 (ok) checking for gawk... gawk checking for xattr support... yes, shared checking for xattr files in default path... found in /usr checking for attr_get in -lattr... yes checking how to print strings... printf checking for a sed that does not truncate output... (cached) /bin/sed checking for fgrep... /bin/grep -F checking for ld used by cc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking for gawk... (cached) gawk checking command to parse /usr/bin/nm -B output from cc object... ok checking for sysroot... no checking for mt... mt checking if mt is a manifest tool... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if cc supports -fno-rtti -fno-exceptions... no checking for cc option to produce PIC... -fPIC -DPIC checking if cc PIC flag -fPIC -DPIC works... yes checking if cc static flag -static works... yes checking if cc supports -c -o file.o... yes checking if cc supports -c -o file.o... (cached) yes checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating ./config.status config.status: creating config.h config.status: executing libtool commands running: make /bin/bash /tmp/pear/temp/pear-build-rootdSMx0G/xattr-1.1.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/xattr -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootdSMx0G/xattr-1.1.0/include -I/tmp/pear/temp/pear-build-rootdSMx0G/xattr-1.1.0/main -I/tmp/pear/temp/xattr -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/xattr/xattr.c -o xattr.lo libtool: compile: cc -I. -I/tmp/pear/temp/xattr -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootdSMx0G/xattr-1.1.0/include -I/tmp/pear/temp/pear-build-rootdSMx0G/xattr-1.1.0/main -I/tmp/pear/temp/xattr -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/xattr/xattr.c -fPIC -DPIC -o .libs/xattr.o /tmp/pear/temp/xattr/xattr.c:50:1: error: unknown type name 'function_entry' /tmp/pear/temp/xattr/xattr.c:51:2: warning: braces around scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: (near initialization for 'xattr_functions[0]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: initialization makes integer from pointer without a cast [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: (near initialization for 'xattr_functions[0]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: error: initializer element is not computable at load time /tmp/pear/temp/xattr/xattr.c:51:2: error: (near initialization for 'xattr_functions[0]') /tmp/pear/temp/xattr/xattr.c:51:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: (near initialization for 'xattr_functions[0]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: (near initialization for 'xattr_functions[0]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: (near initialization for 'xattr_functions[0]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:51:2: warning: (near initialization for 'xattr_functions[0]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: braces around scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: (near initialization for 'xattr_functions[1]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: initialization makes integer from pointer without a cast [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: (near initialization for 'xattr_functions[1]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: error: initializer element is not computable at load time /tmp/pear/temp/xattr/xattr.c:52:2: error: (near initialization for 'xattr_functions[1]') /tmp/pear/temp/xattr/xattr.c:52:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: (near initialization for 'xattr_functions[1]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: (near initialization for 'xattr_functions[1]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: (near initialization for 'xattr_functions[1]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:52:2: warning: (near initialization for 'xattr_functions[1]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: braces around scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: (near initialization for 'xattr_functions[2]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: initialization makes integer from pointer without a cast [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: (near initialization for 'xattr_functions[2]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: error: initializer element is not computable at load time /tmp/pear/temp/xattr/xattr.c:53:2: error: (near initialization for 'xattr_functions[2]') /tmp/pear/temp/xattr/xattr.c:53:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: (near initialization for 'xattr_functions[2]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: (near initialization for 'xattr_functions[2]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: (near initialization for 'xattr_functions[2]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:53:2: warning: (near initialization for 'xattr_functions[2]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: braces around scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: (near initialization for 'xattr_functions[3]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: initialization makes integer from pointer without a cast [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: (near initialization for 'xattr_functions[3]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: error: initializer element is not computable at load time /tmp/pear/temp/xattr/xattr.c:54:2: error: (near initialization for 'xattr_functions[3]') /tmp/pear/temp/xattr/xattr.c:54:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: (near initialization for 'xattr_functions[3]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: (near initialization for 'xattr_functions[3]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: (near initialization for 'xattr_functions[3]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:54:2: warning: (near initialization for 'xattr_functions[3]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: braces around scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: (near initialization for 'xattr_functions[4]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: initialization makes integer from pointer without a cast [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: (near initialization for 'xattr_functions[4]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: error: initializer element is not computable at load time /tmp/pear/temp/xattr/xattr.c:55:2: error: (near initialization for 'xattr_functions[4]') /tmp/pear/temp/xattr/xattr.c:55:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: (near initialization for 'xattr_functions[4]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: (near initialization for 'xattr_functions[4]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: (near initialization for 'xattr_functions[4]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:55:2: warning: (near initialization for 'xattr_functions[4]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: braces around scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: (near initialization for 'xattr_functions[5]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: initialization makes integer from pointer without a cast [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: (near initialization for 'xattr_functions[5]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: (near initialization for 'xattr_functions[5]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: excess elements in scalar initializer [enabled by default] /tmp/pear/temp/xattr/xattr.c:56:2: warning: (near initialization for 'xattr_functions[5]') [enabled by default] /tmp/pear/temp/xattr/xattr.c:67:2: warning: initialization from incompatible pointer type [enabled by default] /tmp/pear/temp/xattr/xattr.c:67:2: warning: (near initialization for 'xattr_module_entry.functions') [enabled by default] /tmp/pear/temp/xattr/xattr.c: In function 'zif_xattr_set': /tmp/pear/temp/xattr/xattr.c:122:49: error: 'struct _php_core_globals' has no member named 'safe_mode' /tmp/pear/temp/xattr/xattr.c:122:92: error: 'CHECKUID_DISALLOW_FILE_NOT_EXISTS' undeclared (first use in this function) /tmp/pear/temp/xattr/xattr.c:122:92: note: each undeclared identifier is reported only once for each function it appears in /tmp/pear/temp/xattr/xattr.c: In function 'zif_xattr_get': /tmp/pear/temp/xattr/xattr.c:171:49: error: 'struct _php_core_globals' has no member named 'safe_mode' /tmp/pear/temp/xattr/xattr.c:171:92: error: 'CHECKUID_DISALLOW_FILE_NOT_EXISTS' undeclared (first use in this function) /tmp/pear/temp/xattr/xattr.c:187:2: warning: passing argument 4 of 'attr_get' from incompatible pointer type [enabled by default] In file included from /tmp/pear/temp/xattr/xattr.c:37:0: /usr/include/attr/attributes.h:122:12: note: expected 'int *' but argument is of type 'size_t *' /tmp/pear/temp/xattr/xattr.c:198:3: warning: passing argument 4 of 'attr_get' from incompatible pointer type [enabled by default] In file included from /tmp/pear/temp/xattr/xattr.c:37:0: /usr/include/attr/attributes.h:122:12: note: expected 'int *' but argument is of type 'size_t *' /tmp/pear/temp/xattr/xattr.c: In function 'zif_xattr_supported': /tmp/pear/temp/xattr/xattr.c:243:49: error: 'struct _php_core_globals' has no member named 'safe_mode' /tmp/pear/temp/xattr/xattr.c:243:92: error: 'CHECKUID_DISALLOW_FILE_NOT_EXISTS' undeclared (first use in this function) /tmp/pear/temp/xattr/xattr.c: In function 'zif_xattr_remove': /tmp/pear/temp/xattr/xattr.c:288:49: error: 'struct _php_core_globals' has no member named 'safe_mode' /tmp/pear/temp/xattr/xattr.c:288:92: error: 'CHECKUID_DISALLOW_FILE_NOT_EXISTS' undeclared (first use in this function) /tmp/pear/temp/xattr/xattr.c: In function 'zif_xattr_list': /tmp/pear/temp/xattr/xattr.c:337:49: error: 'struct _php_core_globals' has no member named 'safe_mode' /tmp/pear/temp/xattr/xattr.c:337:92: error: 'CHECKUID_DISALLOW_FILE_NOT_EXISTS' undeclared (first use in this function) make: *** [xattr.lo] Error 1 ERROR: `make' failed There seem to be a few errors, but I can't make heads or tails of them. Does this just not work properly in 12.10? That would be a big problem for me.

    Read the article

  • start apache2 in chroot environment

    - by xero
    This is my first time I am trying to install Apache2 HTTP server in a chroot environment. That's why i decided to follow this procedure : http://www.symantec.com/connect/articles/securing-apache-2-step-step my web server start with successful : root@ubuntu:/usr/local/apache2/bin/apachectl start [Tue Oct 29 01:49:15.879868 2013] [core:warn] [pid 10835] AH00117: Ignoring deprecated use of DefaultType in line 60 of /usr/local/apache2/conf/httpd.conf. AH00548: NameVirtualHost has no effect and will be removed in the next release /usr/local/apache2/conf/httpd.conf:81 AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message root@ubuntu:/chroot/httpd/etc# netstat -antu Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN But at the end of part "Chrooting the server" i have always the same problem. When i try to start apache2 in chroot i have always this error : root@ubuntu:/chroot/httpd/etc# chroot /chroot/httpd /usr/local/apache2/bin/apachectl chroot: failed to run command `/usr/local/apache2/bin/apachectl': No such file or directory however my apachectl file exist : root@ubuntu:/chroot/httpd/etc# ls -l /chroot/httpd/usr/local/apache2/bin/apachectl -rwxr-xr-x 1 root root 3437 Oct 29 02:28 /chroot/httpd/usr/local/apache2/bin/apachectl when I use strace to debug, there are errors with coreutils.mo and libc.mo : root@ubuntu:/chroot/httpd/etc# chroot /chroot/httpd /usr/local/apache2/bin/httpd group hosts nsswitch.conf passwd passwords resolv.conf root@ubuntu:/chroot/httpd/etc# strace chroot /chroot/httpd /usr/local/apache2/bin/apachectl execve("/usr/sbin/chroot", ["chroot", "/chroot/httpd", "/usr/local/apache2/bin/apachectl"], [/* 18 vars */]) = 0 brk(0) = 0x1e46000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe89563b000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=18263, ...}) = 0 mmap(NULL, 18263, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe895636000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1815224, ...}) = 0 mmap(NULL, 3929304, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe89505b000 mprotect(0x7fe895210000, 2097152, PROT_NONE) = 0 mmap(0x7fe895410000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b5000) = 0x7fe895410000 mmap(0x7fe895416000, 17624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe895416000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe895635000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe895634000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe895633000 arch_prctl(ARCH_SET_FS, 0x7fe895634700) = 0 mprotect(0x7fe895410000, 16384, PROT_READ) = 0 mprotect(0x606000, 4096, PROT_READ) = 0 mprotect(0x7fe89563d000, 4096, PROT_READ) = 0 munmap(0x7fe895636000, 18263) = 0 brk(0) = 0x1e46000 brk(0x1e67000) = 0x1e67000 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=2919792, ...}) = 0 mmap(NULL, 2919792, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe894d92000 close(3) = 0 chroot("/chroot/httpd") = 0 chdir("/") = 0 execve("/usr/local/apache2/bin/apachectl", ["/usr/local/apache2/bin/apachectl"], [/* 18 vars */]) = -1 ENOENT (No such file or directory) open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) write(2, "chroot: ", 8chroot: ) = 8 write(2, "failed to run command `/usr/loca"..., 56failed to run command `/usr/local/apache2/bin/apachectl') = 56 open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) write(2, ": No such file or directory", 27: No such file or directory) = 27 write(2, "\n", 1 ) = 1 close(1) = 0 close(2) = 0 exit_group(127) = ? using the tutorial I did not find and copie libraries following on my server. I suppose there is no link with coreutils.mo and libc.mo : /usr/libexec/ld-elf.so.1 /var/run/ld-elf.so.hints I don't understand what files i forgot to copy in my chroot environment to be able to start my apache2. Any ideas ?

    Read the article

  • libcrypto.so.0.9.8: could not read symbols: Invalid operation

    - by Doug
    Trying to make PHP 5.4.4 with various extensions (I know you can apt-get this, but I need to do it because I have a new installation of Apache 2.4.2 which isn't available via repos). However, I am stuck and I don't know what this error means. /usr/bin/ld: ext/curl/.libs/interface.o: undefined reference to symbol 'CRYPTO_set_id_callback@@OPENSSL_0.9.8' /usr/bin/ld: note: 'CRYPTO_set_id_callback@@OPENSSL_0.9.8' is defined in DSO /usr/lib/libcrypto.so.0.9.8 so try adding it to the linker command line /usr/lib/libcrypto.so.0.9.8: could not read symbols: Invalid operation collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1

    Read the article

  • Error installing nginx with passenger-install-nginx-module on ubuntu 11.10 & rails 3.1.0

    - by user938363
    Here is the error message from installing nginx with passenger-install- nginx-module (rvmsudo). The nginx is 1.0.6 installed under /opt/nginx (default). gem install passenger successfully prior. Someone has idea about the problem? thanks. /usr/bin/ld: /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/ ext/nginx/../common/libpassenger_common.a(aggregate.o): undefined reference to symbol 'round@@GLIBC_2.2.5' /usr/bin/ld: note: 'round@@GLIBC_2.2.5' is defined in DSO /usr/lib/gcc/ x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/libm.so so try adding it to the linker command line /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/libm.so: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[1]: *** [objs/nginx] Error 1 make[1]: Leaving directory `/tmp/root-passenger-2135/nginx-1.0.6' make: *** [build] Error 2 -------------------------------------------- It looks like something went wrong

    Read the article

  • PCI-e SEALEVEL dual serial card not recognized on Ubuntu 14.04

    - by kwhunter
    New to Ubuntu, running 14.04. I have trouble with the serial port setup, I have a plug-in PCI-e SEALEVEL dual serial card that is not recognized. user1@WSIWORKSTATION2:~$ dmesg | grep tty [ 0.000000] console [tty0] enabled [ 1.577197] 00:06: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 1.943326] tty ttyprintk: hash matches [ 17.240880] ttyS4: LSR safety check engaged! [ 17.241589] ttyS4: LSR safety check engaged! [ 17.242354] ttyS5: LSR safety check engaged! [ 17.243058] ttyS5: LSR safety check engaged! [ 17.243918] ttyS6: LSR safety check engaged! [ 17.244485] ttyS6: LSR safety check engaged! [ 17.245195] ttyS7: LSR safety check engaged! [ 17.245830] ttyS7: LSR safety check engaged! [ 17.246554] ttyS8: LSR safety check engaged! [ 17.247191] ttyS8: LSR safety check engaged! user1@WSIWORKSTATION2:~/Desktop/seacom$ lspci -d 135e: -vvv 02:04.0 Bridge: Sealevel Systems Inc Device e205 (rev aa) Subsystem: Sealevel Systems Inc Device e205 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium TAbort- SERR- Capabilities: However, the manufacturer's drivers won't install: 1. user1@WSIWORKSTATION2:~/Desktop/seacom$ make install ---------------------------------------------------------------- Installing seacom suite. ---------------------------------------------------------------- --Installing utilities-- /usr/bin/ld: skipping incompatible ../../lib/libftd2xx.a when searching for -lftd2xx /usr/bin/ld: cannot find -lftd2xx collect2: error: ld returned 1 exit status make[2]: *** [setusb] Error 1 make[1]: *** [install] Error 1 make: *** [install] Error 1 2. user1@WSIWORKSTATION2:~/Desktop/seaio$ make install ---------------------------------------------------------------- Installing SD suite. ---------------------------------------------------------------- *Compiling SeaIO Library source file: digitalIoDevice.cpp gcc: error trying to exec 'cc1plus': execvp: No such file or directory make[1]: *** [digitalIoDevice.o] Error 1 make: *** [install] Error 1 I was not able to find a solution, so if anyone can help it will be much appreciated. PS Have some troubles with formatting my post, apologies...

    Read the article

  • Is LiveDrive.com reliable?

    - by Marc
    I'm currently using DropBox (50GB account) which works fine, but at this moment I'm not impressed with its speed. I have a 60down/6up connection and only LiveDrive can use almost the full bandwidth of my connection. Dropbox often is very slow (avg. 100-500Kb/s compared to LD at 6MB/s). If I only look at the speed and storage costs then LD is much better, but I don't have enough experience with LD to be able to say something about reliability. Can anyone comment on this? Thx.

    Read the article

  • Trying to make ZeroRadiant work on Lubuntu 11.10

    - by maniat1k
    I'm looking to use ZeroRadiant to work on ubuntu, it's to create maps on urban terror, I know that works on windows and mac. I found this HOWTO but could not make it work. I've got stock on this when I do. ~/ZeroRadiant-src$ scons target=radiant,q3map2 config=release at the end shows me this: collect2: ld returned 1 exit status scons: *** [build/release/radiant/radiant.bin] Error 1 scons: building terminated because of errors. there's a note on the how to that says: If you get other errors, you may try asking for help in the GtkRadiant IRC channel, which is listed on the main ZeroRadiant page. the page does not there and I could find that IRC channel. EDIT thanks to @jokerdino in the chat sow me this If you have the proprietary NVIDIA driver installed and you get the following error when executing the build target above: /usr/bin/ld: cannot find -lGL collect2: ld returned 1 exit status scons: *** [build/release/radiant/radiant.bin] Error 1 scons: building terminated because of errors. then you should install one of the nvidia-glx-dev* packages as mentioned above in Step A, then try to execute the main build target to compile GtkRadiant again. I don't have nvidia; I do have ATI AMD Radeon HD 6320, and looks like it works. GL_VERSION: 4.1.11251 Compatibility Profile Context GL_VENDOR: ATI Technologies Inc. GL_RENDERER: AMD Radeon HD 6320 Graphics I'm think I do have video issues but.. how do I detect this? how can I continue?

    Read the article

  • Error compiling GLib in Ubuntu 14.04 (trying to install GimpShop)

    - by Nicolás Salvarrey
    I'm kinda new in Linux, so please take it easy on the most complicated stuff. I'm trying to install GimpShop. Installation guide asks me to install GLib first, and when I try to compile it using the make command I get errors. When I run the ./configure --prefix=/usr command, I get this: checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for the BeOS... no checking for Win32... no checking whether to enable garbage collector friendliness... no checking whether to disable memory pools... no checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for c++... no checking for g++... no checking for gcc... gcc checking whether we are using the GNU C++ compiler... no checking whether gcc accepts -g... no checking dependency style of gcc... gcc3 checking for gcc option to accept ANSI C... none needed checking for a BSD-compatible install... /usr/bin/install -c checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking for _LARGE_FILES value needed for large files... no checking for pkg-config... /usr/bin/pkg-config checking for gawk... (cached) mawk checking for perl5... no checking for perl... perl checking for indent... no checking for perl... /usr/bin/perl checking for iconv_open... yes checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking for LC_MESSAGES... yes checking libintl.h usability... yes checking libintl.h presence... yes checking for libintl.h... yes checking for ngettext in libc... yes checking for dgettext in libc... yes checking for bind_textdomain_codeset... yes checking for msgfmt... /usr/bin/msgfmt checking for dcgettext... yes checking for gmsgfmt... /usr/bin/msgfmt checking for xgettext... /usr/bin/xgettext checking for catalogs to be installed... am ar az be bg bn bs ca cs cy da de el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr id is it ja ko lt lv mk mn ms nb ne nl nn no or pa pl pt pt_BR ro ru sk sl sq sr sr@ije sr@Latn sv ta tl tr uk vi wa xh yi zh_CN zh_TW checking for a sed that does not truncate output... /bin/sed checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g77... no checking for f77... no checking for xlf... no checking for frt... no checking for pgf77... no checking for fort77... no checking for fl32... no checking for af77... no checking for f90... no checking for xlf90... no checking for pgf90... no checking for epcf90... no checking for f95... no checking for fort... no checking for xlf95... no checking for ifc... no checking for efc... no checking for pgf95... no checking for lf95... no checking for gfortran... no checking whether we are using the GNU Fortran 77 compiler... no checking whether accepts -g... no checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool appending configuration tag "F77" to libtool checking for extra flags to get ANSI library prototypes... none needed checking for extra flags for POSIX compliance... none needed checking for ANSI C header files... (cached) yes checking for vprintf... yes checking for _doprnt... no checking for working alloca.h... yes checking for alloca... yes checking for atexit... yes checking for on_exit... yes checking for char... yes checking size of char... 1 checking for short... yes checking size of short... 2 checking for long... yes checking size of long... 8 checking for int... yes checking size of int... 4 checking for void *... yes checking size of void *... 8 checking for long long... yes checking size of long long... 8 checking for __int64... no checking size of __int64... 0 checking for format to printf and scanf a guint64... %llu checking for an ANSI C-conforming const... yes checking if malloc() and friends prototypes are gmem.h compatible... no checking for growing stack pointer... yes checking for __inline... yes checking for __inline__... yes checking for inline... yes checking if inline functions in headers work... yes checking for ISO C99 varargs macros in C... yes checking for ISO C99 varargs macros in C++... no checking for GNUC varargs macros... yes checking for GNUC visibility attribute... yes checking whether byte ordering is bigendian... no checking dirent.h usability... yes checking dirent.h presence... yes checking for dirent.h... yes checking float.h usability... yes checking float.h presence... yes checking for float.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking sys/poll.h usability... yes checking sys/poll.h presence... yes checking for sys/poll.h... yes checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking for sys/types.h... (cached) yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/times.h usability... yes checking sys/times.h presence... yes checking for sys/times.h... yes checking for unistd.h... (cached) yes checking values.h usability... yes checking values.h presence... yes checking for values.h... yes checking for stdint.h... (cached) yes checking sched.h usability... yes checking sched.h presence... yes checking for sched.h... yes checking langinfo.h usability... yes checking langinfo.h presence... yes checking for langinfo.h... yes checking for nl_langinfo... yes checking for nl_langinfo and CODESET... yes checking whether we are using the GNU C Library 2.1 or newer... yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for setlocale... yes checking for size_t... yes checking size of size_t... 8 checking for the appropriate definition for size_t... unsigned long checking for lstat... yes checking for strerror... yes checking for strsignal... yes checking for memmove... yes checking for mkstemp... yes checking for vsnprintf... yes checking for stpcpy... yes checking for strcasecmp... yes checking for strncasecmp... yes checking for poll... yes checking for getcwd... yes checking for nanosleep... yes checking for vasprintf... yes checking for setenv... yes checking for unsetenv... yes checking for getc_unlocked... yes checking for readlink... yes checking for symlink... yes checking for C99 vsnprintf... yes checking whether printf supports positional parameters... yes checking for signed... yes checking for long long... (cached) yes checking for long double... yes checking for wchar_t... yes checking for wint_t... yes checking for size_t... (cached) yes checking for ptrdiff_t... yes checking for inttypes.h... yes checking for stdint.h... yes checking for snprintf... yes checking for C99 snprintf... yes checking for sys_errlist... yes checking for sys_siglist... yes checking for sys_siglist declaration... yes checking for fd_set... yes, found in sys/types.h checking whether realloc (NULL,) will work... yes checking for nl_langinfo (CODESET)... yes checking for OpenBSD strlcpy/strlcat... no checking for an implementation of va_copy()... yes checking for an implementation of __va_copy()... yes checking whether va_lists can be copied by value... no checking for dlopen... no checking for NSLinkModule... no checking for dlopen in -ldl... yes checking for dlsym in -ldl... yes checking for RTLD_GLOBAL brokenness... no checking for preceeding underscore in symbols... no checking for dlerror... yes checking for the suffix of shared libraries... .so checking for gspawn implementation... gspawn.lo checking for GIOChannel implementation... giounix.lo checking for platform-dependent source... checking whether to compile timeloop... yes checking if building for some Win32 platform... no checking for thread implementation... posix checking thread related cflags... -pthread checking for sched_get_priority_min... yes checking thread related libraries... -pthread checking for localtime_r... yes checking for posix getpwuid_r... yes checking size of pthread_t... 8 checking for pthread_attr_setstacksize... yes checking for minimal/maximal thread priority... sched_get_priority_min(SCHED_OTHER)/sched_get_priority_max(SCHED_OTHER) checking for pthread_setschedparam... yes checking for posix yield function... sched_yield checking size of pthread_mutex_t... 40 checking byte contents of PTHREAD_MUTEX_INITIALIZER... 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 checking whether to use assembler code for atomic operations... x86_64 checking value of POLLIN... 1 checking value of POLLOUT... 4 checking value of POLLPRI... 2 checking value of POLLERR... 8 checking value of POLLHUP... 16 checking value of POLLNVAL... 32 checking for EILSEQ... yes configure: creating ./config.status config.status: creating glib-2.0.pc config.status: creating glib-2.0-uninstalled.pc config.status: creating gmodule-2.0.pc config.status: creating gmodule-no-export-2.0.pc config.status: creating gmodule-2.0-uninstalled.pc config.status: creating gthread-2.0.pc config.status: creating gthread-2.0-uninstalled.pc config.status: creating gobject-2.0.pc config.status: creating gobject-2.0-uninstalled.pc config.status: creating glib-zip config.status: creating glib-gettextize config.status: creating Makefile config.status: creating build/Makefile config.status: creating build/win32/Makefile config.status: creating build/win32/dirent/Makefile config.status: creating glib/Makefile config.status: creating glib/libcharset/Makefile config.status: creating glib/gnulib/Makefile config.status: creating gmodule/Makefile config.status: creating gmodule/gmoduleconf.h config.status: creating gobject/Makefile config.status: creating gobject/glib-mkenums config.status: creating gthread/Makefile config.status: creating po/Makefile.in config.status: creating docs/Makefile config.status: creating docs/reference/Makefile config.status: creating docs/reference/glib/Makefile config.status: creating docs/reference/glib/version.xml config.status: creating docs/reference/gobject/Makefile config.status: creating docs/reference/gobject/version.xml config.status: creating tests/Makefile config.status: creating tests/gobject/Makefile config.status: creating m4macros/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands config.status: executing default-1 commands config.status: executing glibconfig.h commands config.status: glibconfig.h is unchanged config.status: executing chmod-scripts commands nsalvarrey@Delleuze:~/glib-2.6.3$ ^C nsalvarrey@Delleuze:~/glib-2.6.3$ And then, with the make command, I get this: galias.h:83:39: error: 'g_ascii_digit_value' aliased to undefined symbol 'IA__g_ascii_digit_value' extern __typeof (g_ascii_digit_value) g_ascii_digit_value __attribute((alias("IA__g_ascii_digit_value"), visibility("default"))); ^ In file included from garray.c:35:0: galias.h:31:35: error: 'g_allocator_new' aliased to undefined symbol 'IA__g_allocator_new' extern __typeof (g_allocator_new) g_allocator_new __attribute((alias("IA__g_allocator_new"), visibility("default"))); ^ make[4]: *** [garray.lo] Error 1 make[4]: se sale del directorio «/home/nsalvarrey/glib-2.6.3/glib» make[3]: *** [all-recursive] Error 1 make[3]: se sale del directorio «/home/nsalvarrey/glib-2.6.3/glib» make[2]: *** [all] Error 2 make[2]: se sale del directorio «/home/nsalvarrey/glib-2.6.3/glib» make[1]: *** [all-recursive] Error 1 make[1]: se sale del directorio «/home/nsalvarrey/glib-2.6.3» make: *** [all] Error 2 nsalvarrey@Delleuze:~/glib-2.6.3$ (it's actually a lot longer) Can somebody help me?

    Read the article

  • 11415 compile errors FTW?!

    - by Koning Baard
    Hello. This is something I've really never seen but, I downloaded the source code of the sine wave example at http://www.audiosynth.com/sinewavedemo.html . It is in an old Project Builder Project format, and I want to compile it with Xcode (GCC). However, Xcode gives me 11415 compile errors. The first few are (all in the precompilation of AppKit.h): /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:31:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:31: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:33:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:33: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:35:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:35: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:36:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:36: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:37:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:37: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:38:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:38: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:40:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:40: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:42:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:42: error: expected identifier or '(' before '@' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:48:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:48: error: expected identifier or '(' before '@' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:54:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:54: error: expected identifier or '(' before '@' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:59:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:59: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:61:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:61: error: expected identifier or '(' before '@' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:69:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:69: error: expected identifier or '(' before '+' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:71:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:71: error: expected identifier or '(' before '+' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:39:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:39: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:40:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:40: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:41:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:41: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:42:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:42: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:43:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:43: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:44:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:44: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:45:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:45: error: expected identifier or '(' before '-' token /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:46:0 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:46: error: expected identifier or '(' before '-' token Some of the code is: HAL.c /* * HAL.c * Sinewave * * Created by james on Fri Apr 27 2001. * Copyright (c) 2001 __CompanyName__. All rights reserved. * */ #include "HAL.h" #include "math.h" appGlobals gAppGlobals; OSStatus appIOProc (AudioDeviceID inDevice, const AudioTimeStamp* inNow, const AudioBufferList* inInputData, const AudioTimeStamp* inInputTime, AudioBufferList* outOutputData, const AudioTimeStamp* inOutputTime, void* device); #define FailIf(cond, handler) \ if (cond) { \ goto handler; \ } #define FailWithAction(cond, action, handler) \ if (cond) { \ { action; } \ goto handler; \ } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // HAL Sample Code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //#define noErr 0 //#define false 0 OSStatus SetupHAL (appGlobalsPtr globals) { OSStatus err = noErr; UInt32 count, bufferSize; AudioDeviceID device = kAudioDeviceUnknown; AudioStreamBasicDescription format; // get the default output device for the HAL count = sizeof(globals->device); // it is required to pass the size of the data to be returned err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &count, (void *) &device); fprintf(stderr, "kAudioHardwarePropertyDefaultOutputDevice %d\n", err); if (err != noErr) goto Bail; // get the buffersize that the default device uses for IO count = sizeof(globals->deviceBufferSize); // it is required to pass the size of the data to be returned err = AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyBufferSize, &count, &bufferSize); fprintf(stderr, "kAudioDevicePropertyBufferSize %d %d\n", err, bufferSize); if (err != noErr) goto Bail; // get a description of the data format used by the default device count = sizeof(globals->deviceFormat); // it is required to pass the size of the data to be returned err = AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyStreamFormat, &count, &format); fprintf(stderr, "kAudioDevicePropertyStreamFormat %d\n", err); fprintf(stderr, "sampleRate %g\n", format.mSampleRate); fprintf(stderr, "mFormatFlags %08X\n", format.mFormatFlags); fprintf(stderr, "mBytesPerPacket %d\n", format.mBytesPerPacket); fprintf(stderr, "mFramesPerPacket %d\n", format.mFramesPerPacket); fprintf(stderr, "mChannelsPerFrame %d\n", format.mChannelsPerFrame); fprintf(stderr, "mBytesPerFrame %d\n", format.mBytesPerFrame); fprintf(stderr, "mBitsPerChannel %d\n", format.mBitsPerChannel); if (err != kAudioHardwareNoError) goto Bail; FailWithAction(format.mFormatID != kAudioFormatLinearPCM, err = paramErr, Bail); // bail if the format is not linear pcm // everything is ok so fill in these globals globals->device = device; globals->deviceBufferSize = bufferSize; globals->deviceFormat = format; Bail: return (err); } /* struct AudioStreamBasicDescription { Float64 mSampleRate; // the native sample rate of the audio stream UInt32 mFormatID; // the specific encoding type of audio stream UInt32 mFormatFlags; // flags specific to each format UInt32 mBytesPerPacket; // the number of bytes in a packet UInt32 mFramesPerPacket; // the number of frames in each packet UInt32 mBytesPerFrame; // the number of bytes in a frame UInt32 mChannelsPerFrame; // the number of channels in each frame UInt32 mBitsPerChannel; // the number of bits in each channel }; typedef struct AudioStreamBasicDescription AudioStreamBasicDescription; */ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // This is a simple playThru ioProc. It simply places the data in the input buffer back into the output buffer. // Watch out for feedback from Speakers to Microphone OSStatus appIOProc (AudioDeviceID inDevice, const AudioTimeStamp* inNow, const AudioBufferList* inInputData, const AudioTimeStamp* inInputTime, AudioBufferList* outOutputData, const AudioTimeStamp* inOutputTime, void* appGlobals) { appGlobalsPtr globals = appGlobals; int i; double phase = gAppGlobals.phase; double amp = gAppGlobals.amp; double pan = gAppGlobals.pan; double freq = gAppGlobals.freq * 2. * 3.14159265359 / globals->deviceFormat.mSampleRate; int numSamples = globals->deviceBufferSize / globals->deviceFormat.mBytesPerFrame; // assume floats for now.... float *out = outOutputData->mBuffers[0].mData; for (i=0; i<numSamples; ++i) { float wave = sin(phase) * amp; phase = phase + freq; *out++ = wave * (1.0-pan); *out++ = wave * pan; } gAppGlobals.phase = phase; return (kAudioHardwareNoError); } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ OSStatus StartPlayingThruHAL(appGlobalsPtr globals) { OSStatus err = kAudioHardwareNoError; if (globals->soundPlaying) return 0; globals->phase = 0.0; err = AudioDeviceAddIOProc(globals->device, appIOProc, (void *) globals); // setup our device with an IO proc if (err != kAudioHardwareNoError) goto Bail; err = AudioDeviceStart(globals->device, appIOProc); // start playing sound through the device if (err != kAudioHardwareNoError) goto Bail; globals->soundPlaying = true; // set the playing status global to true Bail: return (err); } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ OSStatus StopPlayingThruHAL(appGlobalsPtr globals) { OSStatus err = kAudioHardwareNoError; if (!globals->soundPlaying) return 0; err = AudioDeviceStop(globals->device, appIOProc); // stop playing sound through the device if (err != kAudioHardwareNoError) goto Bail; err = AudioDeviceRemoveIOProc(globals->device, appIOProc); // remove the IO proc from the device if (err != kAudioHardwareNoError) goto Bail; globals->soundPlaying = false; // set the playing status global to false Bail: return (err); } Sinewave.m // // a very simple Cocoa CoreAudio app // by James McCartney [email protected] www.audiosynth.com // // Sinewave - this class implements a sine oscillator with dezippered control of frequency, pan and amplitude // #import "Sinewave.h" // define a C struct from the Obj-C object so audio callback can access data typedef struct { @defs(Sinewave); } sinewavedef; // this is the audio processing callback. OSStatus appIOProc (AudioDeviceID inDevice, const AudioTimeStamp* inNow, const AudioBufferList* inInputData, const AudioTimeStamp* inInputTime, AudioBufferList* outOutputData, const AudioTimeStamp* inOutputTime, void* defptr) { sinewavedef* def = defptr; // get access to Sinewave's data int i; // load instance vars into registers double phase = def->phase; double amp = def->amp; double pan = def->pan; double freq = def->freq; double ampz = def->ampz; double panz = def->panz; double freqz = def->freqz; int numSamples = def->deviceBufferSize / def->deviceFormat.mBytesPerFrame; // assume floats for now.... float *out = outOutputData->mBuffers[0].mData; for (i=0; i<numSamples; ++i) { float wave = sin(phase) * ampz; // generate sine wave phase = phase + freqz; // increment phase // write output *out++ = wave * (1.0-panz); // left channel *out++ = wave * panz; // right channel // de-zipper controls panz = 0.001 * pan + 0.999 * panz; ampz = 0.001 * amp + 0.999 * ampz; freqz = 0.001 * freq + 0.999 * freqz; } // save registers back to object def->phase = phase; def->freqz = freqz; def->ampz = ampz; def->panz = panz; return kAudioHardwareNoError; } @implementation Sinewave - (void) setup { OSStatus err = kAudioHardwareNoError; UInt32 count; device = kAudioDeviceUnknown; initialized = NO; // get the default output device for the HAL count = sizeof(device); // it is required to pass the size of the data to be returned err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &count, (void *) &device); if (err != kAudioHardwareNoError) { fprintf(stderr, "get kAudioHardwarePropertyDefaultOutputDevice error %ld\n", err); return; } // get the buffersize that the default device uses for IO count = sizeof(deviceBufferSize); // it is required to pass the size of the data to be returned err = AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyBufferSize, &count, &deviceBufferSize); if (err != kAudioHardwareNoError) { fprintf(stderr, "get kAudioDevicePropertyBufferSize error %ld\n", err); return; } fprintf(stderr, "deviceBufferSize = %ld\n", deviceBufferSize); // get a description of the data format used by the default device count = sizeof(deviceFormat); // it is required to pass the size of the data to be returned err = AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyStreamFormat, &count, &deviceFormat); if (err != kAudioHardwareNoError) { fprintf(stderr, "get kAudioDevicePropertyStreamFormat error %ld\n", err); return; } if (deviceFormat.mFormatID != kAudioFormatLinearPCM) { fprintf(stderr, "mFormatID != kAudioFormatLinearPCM\n"); return; } if (!(deviceFormat.mFormatFlags & kLinearPCMFormatFlagIsFloat)) { fprintf(stderr, "Sorry, currently only works with float format....\n"); return; } initialized = YES; fprintf(stderr, "mSampleRate = %g\n", deviceFormat.mSampleRate); fprintf(stderr, "mFormatFlags = %08lX\n", deviceFormat.mFormatFlags); fprintf(stderr, "mBytesPerPacket = %ld\n", deviceFormat.mBytesPerPacket); fprintf(stderr, "mFramesPerPacket = %ld\n", deviceFormat.mFramesPerPacket); fprintf(stderr, "mChannelsPerFrame = %ld\n", deviceFormat.mChannelsPerFrame); fprintf(stderr, "mBytesPerFrame = %ld\n", deviceFormat.mBytesPerFrame); fprintf(stderr, "mBitsPerChannel = %ld\n", deviceFormat.mBitsPerChannel); } - (void)setAmpVal:(double)val { amp = val; } - (void)setFreqVal:(double)val { freq = val * 2. * 3.14159265359 / deviceFormat.mSampleRate; } - (void)setPanVal:(double)val { pan = val; } - (BOOL)start { OSStatus err = kAudioHardwareNoError; sinewavedef *def; if (!initialized) return false; if (soundPlaying) return false; // initialize phase and de-zipper filters. phase = 0.0; freqz = freq; ampz = amp; panz = pan; def = (sinewavedef *)self; err = AudioDeviceAddIOProc(device, appIOProc, (void *) def); // setup our device with an IO proc if (err != kAudioHardwareNoError) return false; err = AudioDeviceStart(device, appIOProc); // start playing sound through the device if (err != kAudioHardwareNoError) return false; soundPlaying = true; // set the playing status global to true return true; } - (BOOL)stop { OSStatus err = kAudioHardwareNoError; if (!initialized) return false; if (!soundPlaying) return false; err = AudioDeviceStop(device, appIOProc); // stop playing sound through the device if (err != kAudioHardwareNoError) return false; err = AudioDeviceRemoveIOProc(device, appIOProc); // remove the IO proc from the device if (err != kAudioHardwareNoError) return false; soundPlaying = false; // set the playing status global to false return true; } @end Can anyone help me compiling this example? I'd really appriciate it. Thanks

    Read the article

  • Install CLSQL on Mac OS X

    - by Ken
    I have SBCL installed (via macports/darwinports) on my Intel Core 2 Duo Macbook running 10.5.8. I've installed several libraries like this: (require 'asdf) (require 'asdf-install) (asdf-install:install 'cl-who) But when I tried to install CLSQL this way ('clsql) after it downloaded, I got this: ... ; registering #<SYSTEM CLSQL-UFFI {123D9E01}> as CLSQL-UFFI ; $ cd /Users/ken/.sbcl/site/clsql-5.0.5/uffi/; make cc -arch x86_64 -arch i386 -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress clsql_uffi.c -o clsql_uffi.dylib ld: duplicate symbol dyld_stub_binding_helper in /usr/lib/bundle1.o and /usr/lib/bundle1.o for architecture i386 ld: duplicate symbol dyld_stub_binding_helper in /usr/lib/bundle1.o and /usr/lib/bundle1.o for architecture x86_64 collect2: ld returned 1 exit status collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/Nf/Nf4o5ArDFaWBH2OwtnWM3E+++TQ/-Tmp-//ccJyZxou.out (No such file or directory) make: *** [clsql_uffi.so] Error 1 Is there something I forgot, or some trick to get it to build on Mac OS X? I know very little about C libraries on the Mac these days, so I don't even know where to start on this. Thanks!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >