I am trying to install zathura-pdf-poppler-0.2.5 on a Mac OS X running Yosemite. When I try and make, I get the following error:
LD pdf.so
Undefined symbols for architecture x86_64:
"_zathura_document_get_data", referenced from:
_pdf_page_links_get in links.o
_pdf_page_init in page.o
"_zathura_document_get_password", referenced from:
_pdf_document_open in document.o
"_zathura_document_get_path", referenced from:
_pdf_document_open in document.o
"_zathura_document_information_entry_list_new", referenced from:
_pdf_document_get_information in meta.o
"_zathura_document_information_entry_new", referenced from:
_pdf_document_get_information in meta.o
"_zathura_document_set_data", referenced from:
_pdf_document_open in document.o
_pdf_document_free in document.o
"_zathura_document_set_number_of_pages", referenced from:
_pdf_document_open in document.o
"_zathura_index_element_new", referenced from:
_pdf_document_index_generate in index.o
_build_index in index.o
"_zathura_link_free", referenced from:
_pdf_page_links_get in links.o
"_zathura_link_new", referenced from:
_poppler_link_to_zathura_link in utils.o
"_zathura_page_get_document", referenced from:
_pdf_page_links_get in links.o
_pdf_page_init in page.o
"_zathura_page_get_height", referenced from:
_pdf_page_links_get in links.o
_pdf_page_search_text in search.o
"_zathura_page_get_index", referenced from:
_pdf_page_init in page.o
"_zathura_page_set_data", referenced from:
_pdf_page_init in page.o
"_zathura_page_set_height", referenced from:
_pdf_page_init in page.o
"_zathura_page_set_width", referenced from:
_pdf_page_init in page.o
"_zathura_plugin_add_mimetype", referenced from:
_zathura_plugin_register in plugin.o
"_zathura_plugin_set_name", referenced from:
_zathura_plugin_register in plugin.o
"_zathura_plugin_set_register_functions_function", referenced from:
_zathura_plugin_register in plugin.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pdf.so] Error 1
I have the following path set in $PKG_CONFIG_PATH:
/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig:/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.10
Does anyone know how to fix the problem.
Many thanks
I don't know the exact reason that this happens, but I have applied a patch to makefiles and config.mk from MacPort. You can download them in plaintext and use patch Makefile < make.diff and patch config.mk < config.diff to apply the patch.
patch files
I had to change /usr/lib/zathura/pdf.dylib to /usr/lib/zathura/pdf.so after the make install in order to make zathura display pdf files.
Related
I am trying to build the pocl library on MacOS
System:
MBP 16" 2019
Intel i9, AMD Radeon 5500m
Mac OS 12.4
using bash, instead of zsh
llvm from home-brew, -version 14
I have the following in my .bash_profile to setup the build environment
export PATH=/usr/local/opt/llvm/bin:$PATH
export CC=clang
export CMAKE_C_COMPILER=clang
export CXX=clang++
export CMAKE_CXX_COMPILER=clang++
I go and clone the repo with git, cd into the source directory, mkdir build
Then in build/ run:
cmake .. -DENABLE_TESTS=OFF -DENABLE_EXAMPLES=OFF -DENABLE_ICD=OFF
The config seems to work and then when I run make everything builds, and gets to the end but then gives me the following error:
[100%] Linking C executable poclcc
clang-14: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
"_clBuildProgram", referenced from:
_main in poclcc.c.o
_poclu_load_program_multidev in libpoclu.a(misc.c.o)
"_clCreateCommandQueue", referenced from:
_poclu_get_any_device2 in libpoclu.a(misc.c.o)
_poclu_get_multiple_devices in libpoclu.a(misc.c.o)
"_clCreateContext", referenced from:
_main in poclcc.c.o
_poclu_get_any_device2 in libpoclu.a(misc.c.o)
_poclu_get_multiple_devices in libpoclu.a(misc.c.o)
"_clCreateContextFromType", referenced from:
_poclu_create_any_context in libpoclu.a(misc.c.o)
"_clCreateProgramWithBinary", referenced from:
_poclu_load_program_multidev in libpoclu.a(misc.c.o)
"_clCreateProgramWithIL", referenced from:
_poclu_load_program_multidev in libpoclu.a(misc.c.o)
"_clCreateProgramWithSource", referenced from:
_main in poclcc.c.o
_poclu_load_program_multidev in libpoclu.a(misc.c.o)
"_clGetDeviceIDs", referenced from:
_main in poclcc.c.o
_poclu_get_any_device2 in libpoclu.a(misc.c.o)
_poclu_get_multiple_devices in libpoclu.a(misc.c.o)
"_clGetDeviceInfo", referenced from:
_main in poclcc.c.o
_poclu_load_program_multidev in libpoclu.a(misc.c.o)
"_clGetPlatformIDs", referenced from:
_main in poclcc.c.o
_poclu_create_any_context in libpoclu.a(misc.c.o)
_poclu_get_any_device2 in libpoclu.a(misc.c.o)
_poclu_get_multiple_devices in libpoclu.a(misc.c.o)
"_clGetProgramBuildInfo", referenced from:
_main in poclcc.c.o
_poclu_show_program_build_log in libpoclu.a(misc.c.o)
"_clGetProgramInfo", referenced from:
_main in poclcc.c.o
_poclu_show_program_build_log in libpoclu.a(misc.c.o)
"_clReleaseContext", referenced from:
_main in poclcc.c.o
"_clReleaseProgram", referenced from:
_main in poclcc.c.o
ld: symbol(s) not found for architecture x86_64
I checked and libOpenCL.dylib was successfully built in the pocl/build/lib/CL/ directory. Just as a check, I tried compiling clinfo with a direct link to this library and it gave me the same set of error messages shown above.
Running nm libOpenCL.dylib | grep clBuildProgram prints the following:
0000000000013850 t _clBuildProgram
So its in there, but it is a local text section symbol. I don't actually know what that means though, and if that means it should work, or should not work. I don't actually understand what the problem is here or why this linking is failing, or what to do about it. Looking for some guidance on that.
The meaning of the lower case t is that the symbols are local, i.e. not externally visible to linking programs. Upper case T would be externally visible.
POCL has a number of configuration options, not all of which are documented in the Build section of the docs. The VISIBILITY_HIDDEN option is on by default unless the ENABLE_PROXY option is on.
In build/, running:
cmake .. -DENABLE_ICD=OFF -DVISIBILITY_HIDDEN=OFF
and then:
make
the compile succeeds to the end. Then in build/lib/CL/ running:
nm libOpenCL.dylib | grep clBuildProgram
now prints:
0000000000013790 T _clBuildProgram
I am trying to make a C application on OSX(10.9.5) which will connect to mongodb and perform CRUD operations. I am using the release 1.3.5 which I downloaded from: https://github.com/mongodb/mongo-c-driver/releases/tag/1.3.5
I was sucessfully able to install mongo on my system. I am making my application which will use the library to perform CRUD operations. I am using Xcode 6.1.1 as my IDEon osx. I have given the appropriate path for header files in the ide and have no warnings or error before the run. I have given search path for dynamic libraries as well so I think linking should be happening fine as well. However when I try to run I get the following error:
Undefined symbols for architecture x86_64:
"_bson_as_json", referenced from:
_main in find.o "_bson_destroy", referenced from:
_main in find.o "_bson_free", referenced from:
_main in find.o "_bson_new", referenced from:
_main in find.o "_mongoc_cleanup", referenced from:
_main in find.o "_mongoc_client_destroy", referenced from:
_main in find.o "_mongoc_client_get_collection", referenced from:
_main in find.o "_mongoc_client_new", referenced from:
_main in find.o "_mongoc_collection_destroy", referenced from:
_main in find.o "_mongoc_collection_find", referenced from:
_main in find.o "_mongoc_cursor_destroy", referenced from:
_main in find.o "_mongoc_cursor_next", referenced from:
_main in find.o "_mongoc_init", referenced from:
_main in find.o ld: symbol(s) not found for architecture x86_64 clang:error: linker command failed with exit code 1 (use -v to see invocation)
Where am I going wrong?
Looks like you've specified the dynamic library path for libmongoc-1.0.so but not the library it depends on, libbson-1.0.so. Both libraries were installed when you built the driver, so you should be able to specify an additional path and your program will link correctly.
Really stupid C question.
I'm trying to build the source code here so I can start on modifying it for myself
http://curl.haxx.se/libcurl/c/ftpget.html
I download the file, then run
gcc -o test ftpget.c
and get
Undefined symbols:
"_curl_global_init", referenced from:
_main in ccFchguB.o
"_curl_easy_perform", referenced from:
_main in ccFchguB.o
"_curl_easy_setopt", referenced from:
_main in ccFchguB.o
_main in ccFchguB.o
_main in ccFchguB.o
_main in ccFchguB.o
"_curl_easy_cleanup", referenced from:
_main in ccFchguB.o
"_curl_easy_init", referenced from:
_main in ccFchguB.o
"_curl_global_cleanup", referenced from:
_main in ccFchguB.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
which makes no sense to me, because
/usr/local/include/curl/curl.h
exists and has these functions. I'm sure this is some basic c compilation thing I'm missing.
Many thanks for any pointers.
You need to link with the curl library:
gcc -o test ftpget.c -lcurl
I am trying to compiling sphere_2.6a library on Mac OS X. At the beginning the following parameters are required:
Defined Commands and Options:
Compiler = gcc
Compiler options = -g -m32 -DNARCH_UNIX
Install = cp
Ranlib = ranlib
Archiver = ar ru
The is that I get the following error output:
Undefined symbols for architecture i386:
"_hs_getopt", referenced from:
_main in cc36C6uK.o
"_hs_optind", referenced from:
_main in cc36C6uK.o
"_sp_create_header", referenced from:
_main in cc36C6uK.o
"_sp_fpcopy", referenced from:
_main in cc36C6uK.o
"_sp_get_version", referenced from:
_main in cc36C6uK.o
"_sp_verbose", referenced from:
_main in cc36C6uK.o
"_sp_write_header", referenced from:
_main in cc36C6uK.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
make[2]: *** [h_add] Error 1
Does anybody know where is the problem?
Thanks a lot,
Giovanni
I am switching from cocos2d 0.7.2 to 0.8.2 for cocosdenshion, but now i get 7 errors!
Undefined symbols:
"_OBJC_IVAR_$_TransitionScene.inSceneOnTop", referenced from:
_OBJC_IVAR_$_TransitionScene.inSceneOnTop$non_lazy_ptr in PageTurnTransition.o
"_inflateEnd", referenced from:
_inflateMemory_ in ZipUtils.o
_inflateMemory_ in ZipUtils.o
_inflateMemory_ in ZipUtils.o
"_OBJC_IVAR_$_CocosNode.anchorPoint_", referenced from:
_OBJC_IVAR_$_CocosNode.anchorPoint_$non_lazy_ptr in BitmapFontAtlas.o
"_inflate", referenced from:
_inflateMemory_ in ZipUtils.o
"_OBJC_IVAR_$_CocosNode.position_", referenced from:
_OBJC_IVAR_$_CocosNode.position_$non_lazy_ptr in ParallaxNode.o
"_inflateInit2_", referenced from:
_inflateMemory_ in ZipUtils.o
"_OBJC_IVAR_$_CocosNode.contentSize_", referenced from:
_OBJC_IVAR_$_CocosNode.contentSize_$non_lazy_ptr in BitmapFontAtlas.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Please help
It appears that you haven't included the proper headers or linked the proper modules.