Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue installing libcups #48

Closed
ravirajbasis opened this issue Mar 20, 2023 · 6 comments
Closed

Issue installing libcups #48

ravirajbasis opened this issue Mar 20, 2023 · 6 comments
Assignees
Labels
bug Something isn't working platform issue Issue is specific to an OS or desktop priority-high
Milestone

Comments

@ravirajbasis
Copy link

Hi

Trying to install libcups on FreeBSD 12.x!

Extracted the master zip file.

configure command gives following output:

root@localhost:~/Documents/libcups-master/libcups-master # ./configure
checking build system type... x86_64-unknown-freebsd12.3
checking host system type... x86_64-unknown-freebsd12.3
checking for codesign... no
checking for true... /usr/bin/true
checking for gcc... no
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 the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking for ranlib... ranlib
checking for ar... /usr/bin/ar
checking for codesign... (cached) /usr/bin/true
checking for install-sh script... using /root/Documents/libcups-master/libcups-master/install-sh
checking for mkdir... /bin/mkdir
checking for rm... /bin/rm
checking for rmdir... /bin/rmdir
checking for ln... /bin/ln
checking for install-sh script... using /root/Documents/libcups-master/libcups-master/install-sh
checking for pkg-config... /usr/local/bin/pkg-config
checking for strlcat... yes
checking for strlcpy... yes
checking for library containing hstrerror... none required
checking for library containing __res_init... none required
checking for SCDynamicStoreCopyComputerName... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for CoreFoundation/CoreFoundation.h... no
checking for langinfo.h... yes
checking for resolv.h... no
checking for st_gen member in stat structure... yes
checking for long long int... yes
checking for strtoll... yes
checking for pthread.h... yes
checking for pthread_create using -lpthreads... no
checking for pthread_create using -lpthread... yes
checking for zlib.h... yes
checking for inflateCopy in -lz... yes
checking for iconv.h... yes
checking for library containing iconv_open... none required
checking for library containing libiconv_open... no
checking for Avahi... yes
checking for OpenSSL/LibreSSL package... yes
configure: Installing static libraries...
checking whether compiler supports -Wno-char-subscripts... yes
checking whether compiler supports -Wno-deprecated-declarations... yes
checking whether compiler supports -Wno-format-truncation... no
checking whether compiler supports -Wno-format-y2k... yes
checking whether compiler supports -Wno-switch... yes
checking whether compiler supports -Wno-unused-result... yes
checking whether compiler supports -fPIE... yes
configure: creating ./config.status
config.status: creating Makedefs
config.status: creating cups3.pc
config.status: creating packaging/libcups3.list
config.status: creating config.h

make install gave error output as given below:

root@localhost:~/Documents/libcups-master/libcups-master # make install
Installing cups3.pc file to /usr/local/lib/pkgconfig...
======== install in cups ========
Compiling array.c...
Compiling auth.c...
Compiling debug.c...
Compiling dest.c...
Compiling dest-job.c...
Compiling dest-localization.c...
Compiling dest-options.c...
Compiling dir.c...
Compiling dnssd.c...
Compiling encode.c...
Compiling file.c...
Compiling getputfile.c...
Compiling globals.c...
Compiling hash.c...
Compiling http.c...
Compiling http-addr.c...
Compiling http-addrlist.c...
Compiling http-support.c...
Compiling ipp.c...
Compiling ipp-file.c...
Compiling ipp-support.c...
Compiling json.c...
Compiling langprintf.c...
Compiling language.c...
Compiling md5.c...
Compiling notify.c...
Compiling options.c...
Compiling pwg-media.c...
Compiling rand.c...
Compiling raster-error.c...
Compiling raster-stream.c...
Compiling request.c...
Compiling string.c...
Compiling tempfile.c...
Compiling thread.c...
Compiling tls.c...
Compiling transcode.c...
Compiling usersys.c...
Compiling util.c...
Archiving libcups3.a...
Linking libcups3.so.3...
Installing static library to /usr/local/lib...
Installing header files to /usr/local/include/libcups3/cups...
Installing library to /usr/local/lib...
======== install in tools ========
Compiling ippevepcl.c...
Linking ippevepcl...
ld: error: ../cups/libcups3.so: undefined reference to libiconv
ld: error: ../cups/libcups3.so: undefined reference to libiconv_close
ld: error: ../cups/libcups3.so: undefined reference to libiconv_open
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[1]: stopped in /root/Documents/libcups-master/libcups-master/tools
*** Error code 1

Stop.
make: stopped in /root/Documents/libcups-master/libcups-master

Thanks
rraj

@michaelrsweet
Copy link
Member

OK, short term solution, try:

make clean
./configure --disable-shared
make install

I'll investigate why -liconv isn't getting used for the shared library...

@michaelrsweet
Copy link
Member

I also just pushed a potential change (iconv functions should be in the C standard library, but the BSDs might not automatically include libc in a shared library...

[master db7326d] Try a shared library fix for BSD (Issue #48)

@ravirajbasis
Copy link
Author

./configure --disable-shared

Hi

So, the output of commands are:

  1. make clean

root@localhost:~/Documents/libcups-master/libcups-master # make clean
======== clean in cups ========
======== clean in tools ========

  1. ./configure --disable-shared

root@localhost:~/Documents/libcups-master/libcups-master # ./configure --disable-shared
checking build system type... x86_64-unknown-freebsd12.3
checking host system type... x86_64-unknown-freebsd12.3
checking for codesign... no
checking for true... /usr/bin/true
checking for gcc... no
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 the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking for ranlib... ranlib
checking for ar... /usr/bin/ar
checking for codesign... (cached) /usr/bin/true
checking for install-sh script... using /root/Documents/libcups-master/libcups-master/install-sh
checking for mkdir... /bin/mkdir
checking for rm... /bin/rm
checking for rmdir... /bin/rmdir
checking for ln... /bin/ln
checking for install-sh script... using /root/Documents/libcups-master/libcups-master/install-sh
checking for pkg-config... /usr/local/bin/pkg-config
checking for strlcat... yes
checking for strlcpy... yes
checking for library containing hstrerror... none required
checking for library containing __res_init... none required
checking for SCDynamicStoreCopyComputerName... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for CoreFoundation/CoreFoundation.h... no
checking for langinfo.h... yes
checking for resolv.h... no
checking for st_gen member in stat structure... yes
checking for long long int... yes
checking for strtoll... yes
checking for pthread.h... yes
checking for pthread_create using -lpthreads... no
checking for pthread_create using -lpthread... yes
checking for zlib.h... yes
checking for inflateCopy in -lz... yes
checking for iconv.h... yes
checking for library containing iconv_open... none required
checking for library containing libiconv_open... no
checking for Avahi... yes
checking for OpenSSL/LibreSSL package... yes
checking whether compiler supports -Wno-char-subscripts... yes
checking whether compiler supports -Wno-deprecated-declarations... yes
checking whether compiler supports -Wno-format-truncation... no
checking whether compiler supports -Wno-format-y2k... yes
checking whether compiler supports -Wno-switch... yes
checking whether compiler supports -Wno-unused-result... yes
checking whether compiler supports -fPIE... yes
configure: creating ./config.status
config.status: creating Makedefs
config.status: creating cups3.pc
config.status: creating packaging/libcups3.list
config.status: creating config.h
config.status: config.h is unchanged

  1. make install

root@localhost:~/Documents/libcups-master/libcups-master # make install
Installing cups3.pc file to /usr/local/lib/pkgconfig...
======== install in cups ========
Compiling array.c...
Compiling auth.c...
Compiling debug.c...
Compiling dest.c...
Compiling dest-job.c...
Compiling dest-localization.c...
Compiling dest-options.c...
Compiling dir.c...
Compiling dnssd.c...
Compiling encode.c...
Compiling file.c...
Compiling getputfile.c...
Compiling globals.c...
Compiling hash.c...
Compiling http.c...
Compiling http-addr.c...
Compiling http-addrlist.c...
Compiling http-support.c...
Compiling ipp.c...
Compiling ipp-file.c...
Compiling ipp-support.c...
Compiling json.c...
Compiling langprintf.c...
Compiling language.c...
Compiling md5.c...
Compiling notify.c...
Compiling options.c...
Compiling pwg-media.c...
Compiling rand.c...
Compiling raster-error.c...
Compiling raster-stream.c...
Compiling request.c...
Compiling string.c...
Compiling tempfile.c...
Compiling thread.c...
Compiling tls.c...
Compiling transcode.c...
Compiling usersys.c...
Compiling util.c...
Archiving libcups3.a...
Installing header files to /usr/local/include/libcups3/cups...
Installing library to /usr/local/lib...
======== install in tools ========
Compiling ippevepcl.c...
Linking ippevepcl...
ld: error: undefined symbol: libiconv_open

referenced by transcode.c:193
transcode.o:(cupsCharsetToUTF8) in archive ../cups/libcups3.a
referenced by transcode.c:194
transcode.o:(cupsCharsetToUTF8) in archive ../cups/libcups3.a
referenced by transcode.c:351
transcode.o:(cupsUTF8ToCharset) in archive ../cups/libcups3.a
referenced by transcode.c:352
transcode.o:(cupsUTF8ToCharset) in archive ../cups/libcups3.a

ld: error: undefined symbol: libiconv

referenced by transcode.c:204
transcode.o:(cupsCharsetToUTF8) in archive ../cups/libcups3.a
referenced by transcode.c:362
transcode.o:(cupsUTF8ToCharset) in archive ../cups/libcups3.a

ld: error: undefined symbol: libiconv_close

referenced by transcode.c:602
transcode.o:(flush_map) in archive ../cups/libcups3.a
referenced by transcode.c:608
transcode.o:(flush_map) in archive ../cups/libcups3.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[1]: stopped in /root/Documents/libcups-master/libcups-master/tools
*** Error code 1

Stop.
make: stopped in /root/Documents/libcups-master/libcups-master

Thanks
rraj

@michaelrsweet
Copy link
Member

OK, so iconv_open is available but we are trying to use libiconv_open... Something is broken...

@michaelrsweet michaelrsweet self-assigned this Mar 20, 2023
@michaelrsweet michaelrsweet added bug Something isn't working platform issue Issue is specific to an OS or desktop priority-high labels Mar 20, 2023
@michaelrsweet michaelrsweet added this to the v3.0 milestone Mar 20, 2023
@michaelrsweet
Copy link
Member

OK, managed to get FreeBSD 13.1 installed in Parallels on one of my Macs (can't get the mouse to work, apparently a common problem, so this is just from the console). I added a workaround for FreeBSD - no library + FreeBSD = add -liconv.

Try the latest tarball or update your local git clone...

@ravirajbasis
Copy link
Author

OK, managed to get FreeBSD 13.1 installed in Parallels on one of my Macs (can't get the mouse to work, apparently a common problem, so this is just from the console). I added a workaround for FreeBSD - no library + FreeBSD = add -liconv.

Try the latest tarball or update your local git clone...

Hi

Finally it worked! Can run ipptool.

I consider my issue to resolved.

Thanks
rraj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform issue Issue is specific to an OS or desktop priority-high
Projects
None yet
Development

No branches or pull requests

2 participants