pcre library linking issues
I inadvertently updated my PCRE library and in the process broke a number of things that depended on the old library. I now have a number of binaries that look like this: /usr/local/bin$ $ ldd gtester gtester: libglib-2.0.so.0 = /usr/local/lib/libglib-2.0.so.0 (0x2809) libintl.so.9 = /usr/local/lib/libintl.so.9 (0x28168000) libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x28171000) libpcre.so.0 = not found (0x0) libc.so.7 = /lib/libc.so.7 (0x28267000) libpcre.so.0 = not found (0x0) What can I do to fix this in the meantime? Alex ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pcre library linking issues
On Thu, 19 Apr 2012, Aleksandr Miroslav wrote: I inadvertently updated my PCRE library and in the process broke a number of things that depended on the old library. Not the right answer but works: Create a symbolic link in the library so libpcre.so.0 points to libpcre.so.1 The old library should have been moved to a compatibility library so that things that still depended on it could find it. This did not happen for some reason. Fortunately, it appears that libpcre.so.1 is (largely) backwards compatible, so much (all?) of what depended on it will work if fooled by a symbolic link. Some upgrades will wipe out the link so it may be necessary to recreate it until things get straightened out. -- Lars Eighner http://www.larseighner.com/index.html 8800 N IH35 APT 1191 AUSTIN TX 78753-5266 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pcre library linking issues
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 4/19/12 11:28 AM, Lars Eighner wrote: On Thu, 19 Apr 2012, Aleksandr Miroslav wrote: I inadvertently updated my PCRE library and in the process broke a number of things that depended on the old library. Not the right answer but works: Create a symbolic link in the library so libpcre.so.0 points to libpcre.so.1 The old library should have been moved to a compatibility library so that things that still depended on it could find it. This did not happen for some reason. Fortunately, it appears that libpcre.so.1 is (largely) backwards compatible, so much (all?) of what depended on it will work if fooled by a symbolic link. Some upgrades will wipe out the link so it may be necessary to recreate it until things get straightened out. Another option that works well is the /etc/libmap.conf file: http://www.freebsd.org/cgi/man.cgi?query=libmap.conf Hope that helps, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. http://twitter.com/cpucycle/ - Follow you, follow me -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+QQ60ACgkQ0sRouByUApDj6QCgtKl1kymoGvmKgy/rE1TOCTxg glUAn0/nq+fmmluDLiM3meAjxdgUJsRZ =H3uc -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pcre library linking issues
On Thu, 19 Apr 2012, Aleksandr Miroslav wrote: On Thu, Apr 19, 2012 at 11:28 AM, Lars Eighner l...@larseighner.com wrote: Create a symbolic link in the library so libpcre.so.0 points to libpcre.so.1 Thank you, this worked. It's a temporary measure, so rebuild everything that wants the old library, then remove the link. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: clang vs gcc linking problem
On Sun, Feb 26, 2012 at 1:03 AM, Julian H. Stacey j...@berklix.com wrote: Artifex Maximus wrote: Hello! Absolutely not a flame war but would like to switch to clang in a project. Project uses ncurses. gcc works well but the executable fails when compiled other than -O0. Then I think I should change to clang which will becomes the default compiler in FreeBSD. With clang at linking time I got the following error: /usr/local/bin/ld: display/libsub_display.a(canvas.o): undefined reference to symbol 'keypad' /usr/local/bin/ld: note: 'keypad' is defined in DSO /usr/local/lib/libtinfow.so.6.0 so try adding it to the linker command line /usr/local/lib/libtinfow.so.6.0: could not read symbols: Invalid operation clang: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 With exactly the same flags gcc links successful. Any idea where is the problem and what is the solution? Thanks, There have been quite a number of discussions on Gcc Clang of various lists since efforts to transition started, I don't see a specific list here, http://lists.freebsd.org/mailman/listinfo but this may interest http://wiki.freebsd.org/BuildingFreeBSDWithClang Thanks. I did not found any related information on link but finally found a solution. I have to add -ltinfo to LDFLAGS. I still do not know why gcc works without and why clang needs that. Bye, a ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: clang vs gcc linking problem
Artifex Maximus wrote: Hello! Absolutely not a flame war but would like to switch to clang in a project. Project uses ncurses. gcc works well but the executable fails when compiled other than -O0. Then I think I should change to clang which will becomes the default compiler in FreeBSD. With clang at linking time I got the following error: /usr/local/bin/ld: display/libsub_display.a(canvas.o): undefined reference to symbol 'keypad' /usr/local/bin/ld: note: 'keypad' is defined in DSO /usr/local/lib/libtinfow.so.6.0 so try adding it to the linker command line /usr/local/lib/libtinfow.so.6.0: could not read symbols: Invalid operation clang: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 With exactly the same flags gcc links successful. Any idea where is the problem and what is the solution? Thanks, There have been quite a number of discussions on Gcc Clang of various lists since efforts to transition started, I don't see a specific list here, http://lists.freebsd.org/mailman/listinfo but this may interest http://wiki.freebsd.org/BuildingFreeBSDWithClang Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Reply below not above, cumulative like a play script, indent with . Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable. Mail from @yahoo dumped @berklix. http://berklix.org/yahoo/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
clang vs gcc linking problem
Hello! Absolutely not a flame war but would like to switch to clang in a project. Project uses ncurses. gcc works well but the executable fails when compiled other than -O0. Then I think I should change to clang which will becomes the default compiler in FreeBSD. With clang at linking time I got the following error: /usr/local/bin/ld: display/libsub_display.a(canvas.o): undefined reference to symbol 'keypad' /usr/local/bin/ld: note: 'keypad' is defined in DSO /usr/local/lib/libtinfow.so.6.0 so try adding it to the linker command line /usr/local/lib/libtinfow.so.6.0: could not read symbols: Invalid operation clang: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 With exactly the same flags gcc links successful. Any idea where is the problem and what is the solution? Thanks, a ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Checking for broken packages (as in linking)
No, I don't mean checking for broken ports :-P In fact, when I Google around for the answer to my question, that's all I can find, which is why I bring my question to the mailing list instead :) Maybe broken ports or broken packages isn't the right term (what should I be searching for instead?) What I want to know is, are there tools that will check the ports I've installed and tell me if any of my packages are linked against libraries that are no longer there? I'm paranoid that at some point, while I'm building and installing updates, I'm going to break something. I've been using FreeBSD for a little while now, but I'm still learning... :) Thanks in advance! James ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Checking for broken packages (as in linking)
On Fri, 04 Nov 2011 23:27:54 -0700 James Colannino ja...@colannino.org wrote: What I want to know is, are there tools that will check the ports I've installed and tell me if any of my packages are linked against libraries that are no longer there? I'm paranoid that at some point, while I'm building and installing updates, I'm going to break something. The port sysutils/bsdadminscripts includes a tool called pkg_libchk, which does exactly what you're looking for. I've been using FreeBSD for a little while now, but I'm still learning... :) Thanks in advance! Hey, we're all (even us so-called old-timers) still learning. :-) -- Conrad J. Sabatier conr...@cox.net ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Checking for broken packages (as in linking)
On 11/04/11 23:53, Conrad J. Sabatier wrote: On Fri, 04 Nov 2011 23:27:54 -0700 James Colanninoja...@colannino.org wrote: What I want to know is, are there tools that will check the ports I've installed and tell me if any of my packages are linked against libraries that are no longer there? I'm paranoid that at some point, while I'm building and installing updates, I'm going to break something. The port sysutils/bsdadminscripts includes a tool called pkg_libchk, which does exactly what you're looking for. Perfect. Thanks! I've been using FreeBSD for a little while now, but I'm still learning... :) Thanks in advance! Hey, we're all (even us so-called old-timers) still learning. :-) :) James ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Checking for broken packages (as in linking)
On Sat, Nov 5, 2011 at 7:27 AM, James Colannino ja...@colannino.org wrote: No, I don't mean checking for broken ports :-P In fact, when I Google around for the answer to my question, that's all I can find, which is why I bring my question to the mailing list instead :) Maybe broken ports or broken packages isn't the right term (what should I be searching for instead?) What I want to know is, are there tools that will check the ports I've installed and tell me if any of my packages are linked against libraries that are no longer there? I'm paranoid that at some point, while I'm building and installing updates, I'm going to break something. I'm using the following script (attached). I've been using FreeBSD for a little while now, but I'm still learning... :) Thanks in advance! James HTH, -cpghost. -- Cordula's Web. http://www.cordula.ws/ revdep-rebuild.py Description: Binary data ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Checking for broken packages (as in linking)
On 11/05/11 12:43, C. P. Ghost wrote: I'm using the following script (attached). Thanks for the script. By any chance, are you a Gentoo user (or were you at one point)? revdep-rebuild, a part of the gentoolkit, is the first thing I think of when I think about fixing broken packages :) James ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Checking for broken packages (as in linking)
On Sat, 5 Nov 2011, C. P. Ghost wrote: On Sat, Nov 5, 2011 at 7:27 AM, James Colannino ja...@colannino.org wrote: No, I don't mean checking for broken ports :-P In fact, when I Google around for the answer to my question, that's all I can find, which is why I bring my question to the mailing list instead :) Maybe broken ports or broken packages isn't the right term (what should I be searching for instead?) What I want to know is, are there tools that will check the ports I've installed and tell me if any of my packages are linked against libraries that are no longer there? I'm paranoid that at some point, while I'm building and installing updates, I'm going to break something. I'm using the following script (attached). There's also pkg_libchk from sysutils/bsdadminscripts.___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: binutils problem? WAS [Re: static linking error: ELF binary type 0 not known. Exec format error. Binary file not executable.]
On Wed, Dec 15, 2010 at 06:58:50PM +0100, Tijl Coosemans wrote: On Monday 06 December 2010 16:16:30 Anton Shterenlikht wrote: On Mon, Dec 06, 2010 at 02:06:22PM +0100, Tijl Coosemans wrote: On Monday 29 November 2010 14:04:16 Anton Shterenlikht wrote: - Forwarded message from Marcel Moolenaar xcl...@mac.com - On Nov 10, 2010, at 5:32 AM, Anton Shterenlikht wrote: [ia64] ia64% file a.out a.out: ELF 64-bit LSB executable, IA-64, version 1 (SYSV), statically linked, not stripped [amd64] amd64% file a.out a.out: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 9.0 (900023), not stripped The branding on ia64 is wrong. The executable is not marked as being a FreeBSD executable. It's declared as SYSV, whereas on amd64 it's properly declared as FreeBSD. This is a binutils problem. Anybody here can explain better what Marcel meant by binutils problem, and how to fix it? I've binutils-2.20.1_3 installed from devel/binutils. As a workaround you could manually brand the executable: brandelf -f 9 a.out this works fine. A fix has been committed to CURRENT, 8-STABLE and 7-STABLE. You should no longer have to brand executables manually. yes, just checked, many thanks. anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: binutils problem? WAS [Re: static linking error: ELF binary type 0 not known. Exec format error. Binary file not executable.]
On Monday 06 December 2010 16:16:30 Anton Shterenlikht wrote: On Mon, Dec 06, 2010 at 02:06:22PM +0100, Tijl Coosemans wrote: On Monday 29 November 2010 14:04:16 Anton Shterenlikht wrote: - Forwarded message from Marcel Moolenaar xcl...@mac.com - On Nov 10, 2010, at 5:32 AM, Anton Shterenlikht wrote: [ia64] ia64% file a.out a.out: ELF 64-bit LSB executable, IA-64, version 1 (SYSV), statically linked, not stripped [amd64] amd64% file a.out a.out: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 9.0 (900023), not stripped The branding on ia64 is wrong. The executable is not marked as being a FreeBSD executable. It's declared as SYSV, whereas on amd64 it's properly declared as FreeBSD. This is a binutils problem. Anybody here can explain better what Marcel meant by binutils problem, and how to fix it? I've binutils-2.20.1_3 installed from devel/binutils. As a workaround you could manually brand the executable: brandelf -f 9 a.out this works fine. A fix has been committed to CURRENT, 8-STABLE and 7-STABLE. You should no longer have to brand executables manually. signature.asc Description: This is a digitally signed message part.
Re: binutils problem? WAS [Re: static linking error: ELF binary type 0 not known. Exec format error. Binary file not executable.]
On Monday 29 November 2010 14:04:16 Anton Shterenlikht wrote: - Forwarded message from Marcel Moolenaar xcl...@mac.com - On Nov 10, 2010, at 5:32 AM, Anton Shterenlikht wrote: [ia64] ia64% file a.out a.out: ELF 64-bit LSB executable, IA-64, version 1 (SYSV), statically linked, not stripped [amd64] amd64% file a.out a.out: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 9.0 (900023), not stripped The branding on ia64 is wrong. The executable is not marked as being a FreeBSD executable. It's declared as SYSV, whereas on amd64 it's properly declared as FreeBSD. This is a binutils problem. Anybody here can explain better what Marcel meant by binutils problem, and how to fix it? I've binutils-2.20.1_3 installed from devel/binutils. As a workaround you could manually brand the executable: brandelf -f 9 a.out signature.asc Description: This is a digitally signed message part.
Re: binutils problem? WAS [Re: static linking error: ELF binary type 0 not known. Exec format error. Binary file not executable.]
On Mon, Dec 06, 2010 at 02:06:22PM +0100, Tijl Coosemans wrote: On Monday 29 November 2010 14:04:16 Anton Shterenlikht wrote: - Forwarded message from Marcel Moolenaar xcl...@mac.com - On Nov 10, 2010, at 5:32 AM, Anton Shterenlikht wrote: [ia64] ia64% file a.out a.out: ELF 64-bit LSB executable, IA-64, version 1 (SYSV), statically linked, not stripped [amd64] amd64% file a.out a.out: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 9.0 (900023), not stripped The branding on ia64 is wrong. The executable is not marked as being a FreeBSD executable. It's declared as SYSV, whereas on amd64 it's properly declared as FreeBSD. This is a binutils problem. Anybody here can explain better what Marcel meant by binutils problem, and how to fix it? I've binutils-2.20.1_3 installed from devel/binutils. As a workaround you could manually brand the executable: brandelf -f 9 a.out this works fine. many thanks anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
binutils problem? WAS [Re: static linking error: ELF binary type 0 not known. Exec format error. Binary file not executable.]
- Forwarded message from Marcel Moolenaar xcl...@mac.com - On Nov 10, 2010, at 5:32 AM, Anton Shterenlikht wrote: [ia64] ia64% file a.out a.out: ELF 64-bit LSB executable, IA-64, version 1 (SYSV), statically linked, not stripped [amd64] amd64% file a.out a.out: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 9.0 (900023), not stripped The branding on ia64 is wrong. The executable is not marked as being a FreeBSD executable. It's declared as SYSV, whereas on amd64 it's properly declared as FreeBSD. This is a binutils problem. FYI, -- Marcel Moolenaar xcl...@mac.com - End forwarded message - Anybody here can explain better what Marcel meant by binutils problem, and how to fix it? I've binutils-2.20.1_3 installed from devel/binutils. many thanks anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
linking against shared libraries not in default path
I compiled some numerical libraries under my home directory, including static and shared libs. The shared lib is % ls ./src/libslatec.so.1 ./src/libslatec.so.1 % Now I'd like to test shared libraries, so I do % gfortran45 -o test01.x test01.o qc6a.o -L./src/ -lslatec % ./test01.x /libexec/ld-elf.so.1: Shared object libslatec.so.1 not found, required by test01.x % How can I tell the executable to look for a shared library in a specific directory? I tried setting LIBRARY_PATH, but it didn't help. Perhaps I completely misunderstand how shared libraries work.. Please advise many thanks anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: linking against shared libraries not in default path
On Mon, 29 Nov 2010, Anton Shterenlikht wrote: |I compiled some numerical libraries under my home |directory, including static and shared libs. The |shared lib is | |% ls ./src/libslatec.so.1 |./src/libslatec.so.1 |% | |Now I'd like to test shared libraries, so I do | |% gfortran45 -o test01.x test01.o qc6a.o -L./src/ -lslatec |% ./test01.x |/libexec/ld-elf.so.1: Shared object libslatec.so.1 not found, required by test01.x |% | |How can I tell the executable to look for a shared library |in a specific directory? I tried setting LIBRARY_PATH, but |it didn't help. | |Perhaps I completely misunderstand how shared libraries work.. | |Please advise | ldconfig -m ./src/libslatec.so.1 (in your example) +---+ ! CANMOS ISP Network! +---+ ! Best regards ! ! Igor V. Ruzanov, network operational staff! ! e-Mail: ig...@canmos.ru ! +---+ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: linking against shared libraries not in default path
On Mon, 29 Nov 2010, Anton Shterenlikht wrote: |I compiled some numerical libraries under my home |directory, including static and shared libs. The |shared lib is | |% ls ./src/libslatec.so.1 |./src/libslatec.so.1 |% | |Now I'd like to test shared libraries, so I do | |% gfortran45 -o test01.x test01.o qc6a.o -L./src/ -lslatec |% ./test01.x |/libexec/ld-elf.so.1: Shared object libslatec.so.1 not found, required by test01.x |% | |How can I tell the executable to look for a shared library |in a specific directory? I tried setting LIBRARY_PATH, but |it didn't help. | Ooops, sorry, you must give full path of shared object, *NOT* a file name: ldconfig -m ./src in your test example. +---+ ! CANMOS ISP Network! +---+ ! Best regards ! ! Igor V. Ruzanov, network operational staff! ! e-Mail: ig...@canmos.ru ! +---+ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: linking against shared libraries not in default path
On Monday 29 November 2010 14:50:59 Anton Shterenlikht wrote: I compiled some numerical libraries under my home directory, including static and shared libs. The shared lib is % ls ./src/libslatec.so.1 ./src/libslatec.so.1 % Now I'd like to test shared libraries, so I do % gfortran45 -o test01.x test01.o qc6a.o -L./src/ -lslatec % ./test01.x /libexec/ld-elf.so.1: Shared object libslatec.so.1 not found, required by test01.x % How can I tell the executable to look for a shared library in a specific directory? I tried setting LIBRARY_PATH, but it didn't help. The name of the variable is LD_LIBRARY_PATH. It is described in the rtld(1) manpage. You can also add it to the executable using -R as in: % gfortran45 -o test01.x test01.o qc6a.o -L./src/ -Rfull path -lslatec signature.asc Description: This is a digitally signed message part.
Re: linking against shared libraries not in default path
On Mon, Nov 29, 2010 at 03:00:45PM +0100, Tijl Coosemans wrote: On Monday 29 November 2010 14:50:59 Anton Shterenlikht wrote: I compiled some numerical libraries under my home directory, including static and shared libs. The shared lib is % ls ./src/libslatec.so.1 ./src/libslatec.so.1 % Now I'd like to test shared libraries, so I do % gfortran45 -o test01.x test01.o qc6a.o -L./src/ -lslatec % ./test01.x /libexec/ld-elf.so.1: Shared object libslatec.so.1 not found, required by test01.x % How can I tell the executable to look for a shared library in a specific directory? I tried setting LIBRARY_PATH, but it didn't help. The name of the variable is LD_LIBRARY_PATH. It is described in the rtld(1) manpage. You can also add it to the executable using -R as in: % gfortran45 -o test01.x test01.o qc6a.o -L./src/ -Rfull path -lslatec Tijl, thank you. Both options work for me on amd64 and ia64. thanks anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
static linking with gfortran?
On ia64 -current I'm trying to statically link against gfortran45 libraries, following from GCC fortran wiki (http://gcc.gnu.org/wiki/GFortranGettingStarted) : % gfortran45 -static mach-fort.f90 -o z % file z z: ELF 64-bit LSB executable, IA-64, version 1 (SYSV), statically linked, not stripped % ./z ELF binary type 0 not known. ./z: Exec format error. Binary file not executable. What am I missing? many thanks anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Problem with sftp server, static linking, pam and nss_ldap.
Hi, problem solved. It is only FreeBSD 9 (CURRENT) issue. If anyone would have problem like this, solution is available here: http://lists.freebsd.org/pipermail/freebsd-current/2010-January/015236.html Regards -- Piotr Buliński Informatyka na Wydziale Elektrycznym Politechnika Warszawska
Problem with sftp server, static linking, pam and nss_ldap.
Hello, recently we moved our users database to LDAP server, but after that sftp stops working on our students server. We use: - OpenLDAP 2.4.21 - nss_ldap-1.265_3 - pam_ldap-1.8.5 - FreeBSD 9.0-CURRENT amd64 When I use sftp, it drops the connection: {volt}-{~}% sftp localhost Connecting to localhost... Connection closed {volt}-{~}% After short investigation, I've found that problem is in /usr/libexec/sftp-server program (which is our default subsystem in sshd): {volt}-{~}% /usr/libexec/sftp-server No user found for uid 5567 {volt}-{~}% what was quite weird, because sshd works perfectly with users from LDAP server (so I assume that PAM is configured correctly). After that, I've tried to make a simple test with program below: === #include sys/types.h #include pwd.h #include stdarg.h #include stdio.h #include unistd.h int main(int argc, char **argv) { struct passwd *user_pw; user_pw = getpwuid(getuid()); if ((user_pw = getpwuid(getuid())) == NULL) { fprintf(stderr, No user found for uid %lu\n, (u_long)getuid()); return 1; } else { fprintf(stderr, It works %s!\nYour uid is: %lu\n, user_pw-pw_name, (u_long)getuid()); } return 0; } === which is almost copy-pasted from /usr/src/crypto/openssh/sftp-server-main.c I've build it twice. Once with dynamic linking: {volt}-{~}% cc -o test test.c {volt}-{~}% ./test It works bulinskp! Your uid is: 5567 {volt}-{~}% another one with static linking: {volt}-{~}% cc -o test -static test.c {volt}-{~}% ./test No user found for uid 5567 {volt}-{~}% As you can see, it works great with dynamic linking, but if it's build with static linking it can't get user information from LDAP database. Could you be so kind and help me better understand this problem and find some solution for it (I spend some time trying to find it, but this is probably beyond my scope)? I would be really appreciate for any tip. Below are information about my PAM and NSS configuration: {volt}-{~}% cat /etc/nsswitch.conf | grep passwd passwd: files ldap {volt}-{~}% {volt}-{~}% cat /etc/pam.d/sshd | grep -v ^# | grep -v ^$ authsufficient pam_opie.so no_warn no_fake_prompts authrequisite pam_opieaccess.so no_warn allow_local authrequisite /usr/local/lib/pam_af.sodebug authsufficient /usr/local/lib/pam_ldap.so no_warn authrequiredpam_unix.so no_warn try_first_pass account requiredpam_nologin.so account requiredpam_login_access.so account required/usr/local/lib/pam_ldap.so no_warn ignore_authinfo_unavail ignore_unknown_user account requiredpam_unix.so session requiredpam_permit.so session sufficient /usr/local/lib/pam_ldap.so no_warn try_first_pass passwordrequiredpam_unix.so no_warn try_first_pass {volt}-{~}% regards -- Piotr Buliński Informatyka na Wydziale Elektrycznym Politechnika Warszawska
RE: Error linking MYKERNEL
Now I see new Error linking... How I can faind all dependenciesb e f o r kernel compyling ? Arkady Tokaev From: tok...@hotmail.com To: rfar...@predatorlabs.net Subject: RE: Error linking MYKERNEL Date: Mon, 21 Sep 2009 11:40:39 +0400 Great! Thank you for your prompt reply. So, there is task for future: Create validator of config file. Arkady Tokaev Date: Sun, 20 Sep 2009 22:09:51 -0700 Subject: Re: Error linking MYKERNEL From: rfar...@predatorlabs.net To: tok...@hotmail.com; questi...@freebsd.org 2009/9/20 Arkady Tokaev tok...@hotmail.com: After hours of # make buildkernel KERNCONF=MYKERNEL I see this: ... linking kernel.debug if_ural.o(.text+0x743): In function `ural_free_tx_list': /usr/src/sys/dev/usb/if_ural.c:627: undefined reference to `ieee80211_free_node' snip rum and ural are wireless cards, but you have the wlan options commented out. You need to either remove them or add the wlan section back. Устали отбиваться от вирусов? Воспользуйтесь встроенной защитой Internet Explorer 8 _ Устали отбиваться от вирусов? Воспользуйтесь встроенной защитой Internet Explorer 8 http://www.microsoft.ru/ie8___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Error linking MYKERNEL
On Wed, 23 Sep 2009 16:20:18 +0400, Arkady Tokaev tok...@hotmail.com wrote: Now I see new Error linking... How I can faind all dependenciesb e f o r kernel compyling ? Traditionally from the documentation. Template and example files such as GENERIC, NOTES and LINT do contain comments for the various drivers, for example requires so and so. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Error linking MYKERNEL
After hours of # make buildkernel KERNCONF=MYKERNEL I see this: ... linking kernel.debug if_ural.o(.text+0x743): In function `ural_free_tx_list': /usr/src/sys/dev/usb/if_ural.c:627: undefined reference to `ieee80211_free_node' if_ural.o(.text+0x93a): In function `ural_detach': /usr/src/sys/dev/usb/if_ural.c:567: undefined reference to `ieee80211_ifdetach' if_ural.o(.text+0xe1c): In function `ural_attach': /usr/src/sys/dev/usb/if_ural.c:499: undefined reference to `ieee80211_init_chann els' if_ural.o(.text+0xe24):/usr/src/sys/dev/usb/if_ural.c:501: undefined reference t o `ieee80211_ifattach' if_ural.o(.text+0xe7e):/usr/src/sys/dev/usb/if_ural.c:513: undefined reference t o `ieee80211_media_status' if_ural.o(.text+0xe8e):/usr/src/sys/dev/usb/if_ural.c:513: undefined reference t o `ieee80211_media_init' if_ural.o(.text+0xeb0):/usr/src/sys/dev/usb/if_ural.c:515: undefined reference t o `ieee80211_amrr_init' if_ural.o(.text+0xf22):/usr/src/sys/dev/usb/if_ural.c:531: undefined reference t o `ieee80211_announce' if_ural.o(.text+0x1152): In function `ural_raw_xmit': /usr/src/sys/dev/usb/if_ural.c:2402: undefined reference to `ieee80211_free_node ' if_ural.o(.text+0x1181):/usr/src/sys/dev/usb/if_ural.c:2408: undefined reference to `ieee80211_free_node' if_ural.o(.text+0x13b5):/usr/src/sys/dev/usb/if_ural.c:2438: undefined reference to `ieee80211_free_node' if_ural.o(.text+0x15b9): In function `ural_set_chan': /usr/src/sys/dev/usb/if_ural.c:1823: undefined reference to `ieee80211_chan2ieee ' if_ural.o(.text+0x1c5d): In function `ural_start': /usr/src/sys/dev/usb/if_ural.c:1461: undefined reference to `ieee80211_free_node ' if_ural.o(.text+0x1f13):/usr/src/sys/dev/usb/if_ural.c:1479: undefined reference to `ieee80211_cancel_scan' if_ural.o(.text+0x1f42):/usr/src/sys/dev/usb/if_ural.c:1486: undefined reference to `ieee80211_find_txnode' if_ural.o(.text+0x1f87):/usr/src/sys/dev/usb/if_ural.c:1493: undefined reference to `ieee80211_encap' if_ural.o(.text+0x1f98):/usr/src/sys/dev/usb/if_ural.c:1495: undefined reference to `ieee80211_free_node' if_ural.o(.text+0x1ff5):/usr/src/sys/dev/usb/if_ural.c:1366: undefined reference to `ieee80211_crypto_encap' if_ural.o(.text+0x21e5):/usr/src/sys/dev/usb/if_ural.c:1503: undefined reference to `ieee80211_free_node' if_ural.o(.text+0x227a): In function `ural_txeof': /usr/src/sys/dev/usb/if_ural.c:882: undefined reference to `ieee80211_process_ca llback' if_ural.o(.text+0x2309):/usr/src/sys/dev/usb/if_ural.c:901: undefined reference to `ieee80211_free_node' if_ural.o(.text+0x2b89): In function `ural_amrr_update': /usr/src/sys/dev/usb/if_ural.c:2508: undefined reference to `ieee80211_amrr_choo se' if_ural.o(.text+0x2c7b): In function `ural_media_change': /usr/src/sys/dev/usb/if_ural.c:705: undefined reference to `ieee80211_media_chan ge' if_ural.o(.text+0x2e26): In function `ural_ioctl': /usr/src/sys/dev/usb/if_ural.c:1578: undefined reference to `ieee80211_ioctl' if_ural.o(.text+0x309a): In function `ural_task': /usr/src/sys/dev/usb/if_ural.c:755: undefined reference to `ieee80211_beacon_all oc' if_ural.o(.text+0x32bc):/usr/src/sys/dev/usb/if_ural.c:2450: undefined reference to `ieee80211_amrr_node_init' if_ural.o(.text+0x38a4): In function `ural_rxeof': /usr/src/sys/dev/usb/if_ural.c:990: undefined reference to `ieee80211_find_rxnod e' if_ural.o(.text+0x38e6):/usr/src/sys/dev/usb/if_ural.c:993: undefined reference to `ieee80211_input' if_ural.o(.text+0x38ee):/usr/src/sys/dev/usb/if_ural.c:996: undefined reference to `ieee80211_free_node' if_rum.o(.text+0x823): In function `rum_free_tx_list': /usr/src/sys/dev/usb/if_rum.c:668: undefined reference to `ieee80211_free_node' if_rum.o(.text+0xa42): In function `rum_detach': /usr/src/sys/dev/usb/if_rum.c:607: undefined reference to `ieee80211_ifdetach' if_rum.o(.text+0x12c6): In function `rum_attach': /usr/src/sys/dev/usb/if_rum.c:508: undefined reference to `ieee80211_init_channe ls' if_rum.o(.text+0x12fd):/usr/src/sys/dev/usb/if_rum.c:516: undefined reference to `ieee80211_ieee2mhz' if_rum.o(.text+0x1347):/usr/src/sys/dev/usb/if_rum.c:522: undefined reference to `ieee80211_ieee2mhz' if_rum.o(.text+0x1391):/usr/src/sys/dev/usb/if_rum.c:528: undefined reference to `ieee80211_ieee2mhz' if_rum.o(.text+0x13de):/usr/src/sys/dev/usb/if_rum.c:534: undefined reference to `ieee80211_ieee2mhz' if_rum.o(.text+0x1413):/usr/src/sys/dev/usb/if_rum.c:540: undefined reference to `ieee80211_ifattach' if_rum.o(.text+0x1463):/usr/src/sys/dev/usb/if_rum.c:552: undefined reference to `ieee80211_media_status' if_rum.o(.text+0x1476):/usr/src/sys/dev/usb/if_rum.c:552: undefined reference to `ieee80211_media_init' if_rum.o(.text+0x149b):/usr/src/sys/dev/usb/if_rum.c:554: undefined reference to `ieee80211_amrr_init' if_rum.o(.text+0x1513):/usr/src/sys/dev/usb/if_rum.c:571: undefined reference to `ieee80211_announce' if_rum.o(.text+0x1a2d): In function `rum_start': /usr/src/sys/dev/usb/if_rum.c:1398: undefined reference
Re: Error linking MYKERNEL
2009/9/20 Arkady Tokaev tok...@hotmail.com: After hours of # make buildkernel KERNCONF=MYKERNEL I see this: ... linking kernel.debug if_ural.o(.text+0x743): In function `ural_free_tx_list': /usr/src/sys/dev/usb/if_ural.c:627: undefined reference to `ieee80211_free_node' snip rum and ural are wireless cards, but you have the wlan options commented out. You need to either remove them or add the wlan section back. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: reference for beginner on configure/make/compile/linking/etc.
On Thu, 11 Jun 2009 17:09:43 -0500, Gary Gatten ggat...@waddell.com wrote: As you may recall from a recent post I've been trying to get nTop compiled and working on Solaris 10 x86. After 40 - 60 hours (I loose track) I *THINK* it's actually working for the most part. Before certain people get pi$$ed off about this not being a Solaris list - chill for a sec! I'm just looking for some materials that can help me understand the whole configure/make/compile/linking/etc. stuff. Someone that knew this stuff could've probably resolved my issues in a few hours. It seems COMPLETELY overly complex to me - maybe cause the developer tries to make it as portable as possible, but with every *nix like things putting files wherever they want, different cc's / ld's, etc. - I can see where it can get hairy. Anyway, TIA for your input. Hopefully this experience and the references you can point me to will help the next time I try to get something onto FreeBSD! Hi Gary, The whole exercise seems overly complex, because as Mel Flynn has already written is *is*. A nice illustration of all the bits and pieces you have to integrate when using the `GNU build system' is the one at Wikipedia: http://en.wikipedia.org/wiki/GNU_build_system#Tools_included_in_the_GNU_build_system Merely looking at the various parts of the picture makes the mind boggle, but it may help you get a good idea of what the various steps of building software with the GNU build tools entails. Documentation for the various parts of the GNU build system is available online at the web page of each component. Useful starting points are: - The GNU autoconf homepage http://www.gnu.org/software/autoconf/ - The GNU autoconf manual http://www.gnu.org/software/autoconf/manual/index.html - The GNU automake homepage http://www.gnu.org/software/automake/ - The GNU automake manual http://www.gnu.org/software/automake/manual/index.html - The GNU libtool homepage http://www.gnu.org/software/libtool/ - The GNU libtool manual http://www.gnu.org/software/libtool/manual/ Note that the online copies of the manuals refers to particular versions of these tools. Since the various parts of the GNU build system are notorious for introducing new features and for often breaking backwards compatibility, it is a good idea to read the manual version matching the _exact_ version of these tools you have installed. The manuals are installed in Info format as part of the installation process of these tools, so you can commonly read the local version of the manual by typing: % info '(autoconf)' % info '(automake)' % info '(libtool)' One last thing that is useful to know is that the manuals are not always written in the form of educational material for new users. They are a little like a tutorial and a lot like reference guides. So it may take multiple iterations to understand all the concepts described in one of the manuals, and it usually takes multiple attempts at writing a new project ``from scratch'' before you gain enough experience in their use to know where to look in the manual for more help. This is a catch-22 situation, because the manual already contains a LOT of useful information, but you don't know that it is there, or even that it is going to be useful, until you have already read it a few times. After having worked with autotools-based projects for a few years, here are a few suggestions I have: * Read the manuals at least twice, from cover to cover. Don't worry if some things seem to be written in an ancient alien language. They don't make sense the first time through, but they tend to make more sense in the next iterations through the manuals. Make sure that you read the manuals at *least* twice. The first time some things will not make sense. The second time, you will have a general overview in your mind, and more details will fit with the rest of the puzzle. Every time you re-read the manuals you are likely to find more useful details. The manuals contain a HUGE amount of information, but it takes multiple passes to understand and fully appreciate all of it. * Read the code of projects using the GNU build tools... Look at what other projects are doing with the GNU build tools. By reading lots and lots of code, you will be able to see how others have solved their program's portability problems; you will see what they did to customize, extend and adapt the GNU build tools; you will learn new tricks and hacks, see how others write code that runs on multiple operating systems, platforms, machine types, etc. * ... but not all the code out there is `good'. Understand that the complexity of a full-blown build system is big, and as a result many of the projects you looked at misuse or flat out _abuse_ the GNU build tools in horrendous ways. That's ok, as long as you don't blindly copy their (bogus
Re: reference for beginner on configure/make/compile/linking/etc.
EXCELLENT answer When I have a couple hundred hours of free time I'm gonna REALLY dig into this stuff! - Original Message - From: Giorgos Keramidas keram...@ceid.upatras.gr To: Gary Gatten Cc: freebsd-questions@freebsd.org freebsd-questions@freebsd.org Sent: Fri Jun 12 20:48:29 2009 Subject: Re: reference for beginner on configure/make/compile/linking/etc. On Thu, 11 Jun 2009 17:09:43 -0500, Gary Gatten ggat...@waddell.com wrote: As you may recall from a recent post I've been trying to get nTop compiled and working on Solaris 10 x86. After 40 - 60 hours (I loose track) I *THINK* it's actually working for the most part. Before certain people get pi$$ed off about this not being a Solaris list - chill for a sec! I'm just looking for some materials that can help me understand the whole configure/make/compile/linking/etc. stuff. Someone that knew this stuff could've probably resolved my issues in a few hours. It seems COMPLETELY overly complex to me - maybe cause the developer tries to make it as portable as possible, but with every *nix like things putting files wherever they want, different cc's / ld's, etc. - I can see where it can get hairy. Anyway, TIA for your input. Hopefully this experience and the references you can point me to will help the next time I try to get something onto FreeBSD! Hi Gary, The whole exercise seems overly complex, because as Mel Flynn has already written is *is*. A nice illustration of all the bits and pieces you have to integrate when using the `GNU build system' is the one at Wikipedia: http://en.wikipedia.org/wiki/GNU_build_system#Tools_included_in_the_GNU_build_system Merely looking at the various parts of the picture makes the mind boggle, but it may help you get a good idea of what the various steps of building software with the GNU build tools entails. Documentation for the various parts of the GNU build system is available online at the web page of each component. Useful starting points are: - The GNU autoconf homepage http://www.gnu.org/software/autoconf/ - The GNU autoconf manual http://www.gnu.org/software/autoconf/manual/index.html - The GNU automake homepage http://www.gnu.org/software/automake/ - The GNU automake manual http://www.gnu.org/software/automake/manual/index.html - The GNU libtool homepage http://www.gnu.org/software/libtool/ - The GNU libtool manual http://www.gnu.org/software/libtool/manual/ Note that the online copies of the manuals refers to particular versions of these tools. Since the various parts of the GNU build system are notorious for introducing new features and for often breaking backwards compatibility, it is a good idea to read the manual version matching the _exact_ version of these tools you have installed. The manuals are installed in Info format as part of the installation process of these tools, so you can commonly read the local version of the manual by typing: % info '(autoconf)' % info '(automake)' % info '(libtool)' One last thing that is useful to know is that the manuals are not always written in the form of educational material for new users. They are a little like a tutorial and a lot like reference guides. So it may take multiple iterations to understand all the concepts described in one of the manuals, and it usually takes multiple attempts at writing a new project ``from scratch'' before you gain enough experience in their use to know where to look in the manual for more help. This is a catch-22 situation, because the manual already contains a LOT of useful information, but you don't know that it is there, or even that it is going to be useful, until you have already read it a few times. After having worked with autotools-based projects for a few years, here are a few suggestions I have: * Read the manuals at least twice, from cover to cover. Don't worry if some things seem to be written in an ancient alien language. They don't make sense the first time through, but they tend to make more sense in the next iterations through the manuals. Make sure that you read the manuals at *least* twice. The first time some things will not make sense. The second time, you will have a general overview in your mind, and more details will fit with the rest of the puzzle. Every time you re-read the manuals you are likely to find more useful details. The manuals contain a HUGE amount of information, but it takes multiple passes to understand and fully appreciate all of it. * Read the code of projects using the GNU build tools... Look at what other projects are doing with the GNU build tools. By reading lots and lots of code, you will be able to see how others have solved their program's portability problems; you will see what they did to customize, extend and adapt the GNU build tools; you will learn new tricks and hacks, see how others write code that runs
reference for beginner on configure/make/compile/linking/etc.
As you may recall from a recent post I've been trying to get nTop compiled and working on Solaris 10 x86. After 40 - 60 hours (I loose track) I *THINK* it's actually working for the most part. Before certain people get pi$$ed off about this not being a Solaris list - chill for a sec! I'm just looking for some materials that can help me understand the whole configure/make/compile/linking/etc. stuff. Someone that knew this stuff could've probably resolved my issues in a few hours. It seems COMPLETELY overly complex to me - maybe cause the developer tries to make it as portable as possible, but with every *nix like things putting files wherever they want, different cc's / ld's, etc. - I can see where it can get hairy. Anyway, TIA for your input. Hopefully this experience and the references you can point me to will help the next time I try to get something onto FreeBSD! TIA! Gary font size=1 div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0pt 0in' /div This email is intended to be reviewed by only the intended recipient and may contain information that is privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any review, use, dissemination, disclosure or copying of this email and its attachments, if any, is strictly prohibited. If you have received this email in error, please immediately notify the sender by return email and delete this email from your system. /font ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: reference for beginner on configure/make/compile/linking/etc.
On Thursday 11 June 2009 14:09:43 Gary Gatten wrote: It seems COMPLETELY overly complex to me - maybe cause the developer tries to make it as portable as possible, but with every *nix like things putting files wherever they want, different cc's / ld's, etc. - I can see where it can get hairy. It *is* overly complex. The original design goal of easily create portable shell to configure and Makefiles has long been replaced with cruft now requiring perl, additional files for linking (.la) and overall confusion when things don't work. It is no wonder that larger projects are switching to cmake and smaller to jam/scons. That said, if the developers know what they're doing, you won't see any OS assumption in the source code (#ifdef __FreeBSD__ and similar) and you would be able to assert portability differences by grepping for '^#ifn?def[[:space:]]+HAVE_' in headers and source. Problems with configure/automake usually can be classified in the following categories: - Unhandled cases developers are not aware of: prerequisite headers or headers in different locations then are assumed. Library symbols in differently named libraries. - Attempt to figure out a prerequisite is present not directly supported by autoconf/automake then created by the developers in not so portable script. - Assumptions on struct members, number of arguments to certain functions, size of data structures, presence of symbols. - Lex/yacc/bison parser generator version problems. I've always found curl (ftp/curl) port a good example of autoconf usage. -- Mel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Problem with linking kernel
On Mon, Jan 05, 2009 at 06:38:19PM +0200, Igor wrote: snip #options INET6 # IPv6 communications protocols options SCTP# Stream Control Transmission Protocol snip excerpt from /sys/conf/NOTES: # Note YOU MUST have both INET and INET6 defined. # you don't have to enable V6, but SCTP is # dual stacked and so far we have not teased apart # the V6 and V4.. HTH, Yuri ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Problem with linking kernel
Sorry for my English...))) FreeBSD 7.0 data from Terminal(after using make buildkernel KERNCONF=MYKERNEL) part with errors: * linking kernel uipc_syscalls.o(.text+0x39f): In function `sctp_generic_recvmsg': : undefined reference to `sctp_sorecvmsg' uipc_syscalls.o(.text+0x21c6): In function `sctp_generic_sendmsg_iov': : undefined reference to `sctp_lower_sosend' uipc_syscalls.o(.text+0x2462): In function `sctp_generic_sendmsg': : undefined reference to `sctp_lower_sosend' uipc_syscalls.o(.text+0x2611): In function `sctp_peeloff': : undefined reference to `sctp_can_peel_off' uipc_syscalls.o(.text+0x27b6): In function `sctp_peeloff': : undefined reference to `sctp_do_peeloff' rtsock.o(.text+0xb0d): In function `rt_newaddrmsg': : undefined reference to `sctp_addr_change' in_proto.o(.data+0xa8): undefined reference to `sctp_input' in_proto.o(.data+0xb0): undefined reference to `sctp_ctlinput' in_proto.o(.data+0xb4): undefined reference to `sctp_ctloutput' in_proto.o(.data+0xbc): undefined reference to `sctp_init' in_proto.o(.data+0xc8): undefined reference to `sctp_drain' in_proto.o(.data+0xcc): undefined reference to `sctp_usrreqs' in_proto.o(.data+0xdc): undefined reference to `sctp_input' in_proto.o(.data+0xe4): undefined reference to `sctp_ctlinput' in_proto.o(.data+0xe8): undefined reference to `sctp_ctloutput' in_proto.o(.data+0xfc): undefined reference to `sctp_drain' in_proto.o(.data+0x100): undefined reference to `sctp_usrreqs' in_proto.o(.data+0x110): undefined reference to `sctp_input' in_proto.o(.data+0x118): undefined reference to `sctp_ctlinput' in_proto.o(.data+0x11c): undefined reference to `sctp_ctloutput' in_proto.o(.data+0x130): undefined reference to `sctp_drain' in_proto.o(.data+0x134): undefined reference to `sctp_usrreqs' if_vr.o(.text+0x1366): In function `vr_init_locked': : undefined reference to `mii_mediachg' if_vr.o(.text+0x172b): In function `vr_tick': : undefined reference to `mii_tick' if_vr.o(.text+0x1f7f): In function `vr_ifmedia_sts': : undefined reference to `mii_pollstat' if_vr.o(.text+0x2da7): In function `vr_attach': : undefined reference to `mii_phy_probe' if_vr.o(.data+0x118): undefined reference to `miibus_driver' if_vr.o(.data+0x11c): undefined reference to `miibus_devclass' if_vr.o(.data+0x190): undefined reference to `miibus_readreg_desc' if_vr.o(.data+0x198): undefined reference to `miibus_writereg_desc' if_vr.o(.data+0x1a0): undefined reference to `miibus_statchg_desc' *** Error code 1 Stop in /usr/obj/usr/src/sys/MYKERNEL. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. * Why? file MYKERNEL is in attachment # machine i386 cpu I486_CPU cpu I586_CPU cpu I686_CPU ident MYKERNEL # To statically compile in device wiring instead of /boot/device.hints #hints GENERIC.hints # Default places to look for devices. #makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols options SCHED_4BSD # 4BSD scheduler options PREEMPTION # Enable kernel thread preemption options INET# InterNETworking #optionsINET6 # IPv6 communications protocols options SCTP# Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL# Enable gjournal-based UFS journaling options MD_ROOT # MD is a potential root device options NFSCLIENT # Network Filesystem Client options NFSSERVER # Network Filesystem Server options NFS_ROOT# NFS usable as /, requires NFSCLIENT #optionsMSDOSFS # MSDOS Filesystem #optionsCD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS# Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY# BSD 4.3 TTY compat [KEEP THIS!] options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 #optionsSCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM
[solved] Re: Linking libraries for compat_linux
On Dec 19, 2008, at 9:46 AM, Chris wrote: I've bumped into a library I can't resolve and I must have a disconnect in how the linux_compat works because I can't see how it could be solved. I found that using FreeBSD Port fam for the daemon with openSUSE 10 fam 2.7.0 for my /compat/linux/lib/libfam.so* worked. Other fam versions from other linux distributions failed. I'm able to detect file changes with a linux binary that employs libfam.so. I tested it using the fileschanged application provided with the linux fam version. qbmonitord also works with this configuration. I have the following: * compat_linux enabled in the kernel, * /usr/ports/emulators/linux_base_fc7 * sysctl kern.fallback_elf_brand=3 * rpm2cpio to alter rpms * cpio to create the directories and place the files where they belong in /compat/linux. I have a program that now has all it's libraries resolved but one in preparation to attempt to run the Linux Quickbooks install on FreeBSD. The ldd output, prior to installing /usr/ports/devel/fam (a required shared library) looks like this. ldd ./opt/qbes7/util/qbmonitord ./opt/qbes7/util/qbmonitord: libfam.so.0 = not found libpthread.so.0 = /lib/libpthread.so.0 (0x28072000) libstdc++.so.6 = /usr/lib/libstdc++.so.6 (0x28088000) libm.so.6 = /lib/libm.so.6 (0x28171000) libgcc_s.so.1 = /lib/libgcc_s.so.1 (0x28198000) libc.so.6 = /lib/libc.so.6 (0x281a4000) /lib/ld-linux.so.2 (0x28054000) I install fam to get rid of the not found, perform the following link: ln /usr/local/lib/libfam.so.0 /compat/linux/lib/libfam.so.0 and then I get this: ldd ./opt/qbes7/util/qbmonitord ./opt/qbes7/util/qbmonitord: ./opt/qbes7/util/qbmonitord: error while loading shared libraries: / lib/libfam.so.0: ELF file OS ABI invalid ./opt/qbes7/util/qbmonitord: exit status 127 which kind of makes sense since this library is not a linux library. I'd read that I don't need to brandelf -t linux a library but I tried that anyway, realizing it was likely meaningless (or harmful). It didn't help of course. My next thought was to try and get a libfam.so.0 binary from a linux distro but stopped when it occurred to me that it would be illogical since fam uses kqueue on FreeBSD rather than something called imon. imon is not available for FreeBSD so a linux version shouldn't be able to function if it expects that. On FreeBSD, fam configures itself to not use imon. What is the appropriate course of action to get a linux flavor shared library for fam (or anything which runs into such conflicts) that will work on FreeBSD yet be recognized as suitable for linux under the compat mode? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions- unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Linking libraries for compat_linux
On Fri, 19 Dec 2008 09:46:03 -0800 Chris wrote: This question is may be better unswered at emulation@ ML. I've bumped into a library I can't resolve and I must have a disconnect in how the linux_compat works because I can't see how it could be solved. I have the following: * compat_linux enabled in the kernel, * /usr/ports/emulators/linux_base_fc7 * sysctl kern.fallback_elf_brand=3 * rpm2cpio to alter rpms * cpio to create the directories and place the files where they belong in /compat/linux. I have a program that now has all it's libraries resolved but one in preparation to attempt to run the Linux Quickbooks install on FreeBSD. The ldd output, prior to installing /usr/ports/devel/fam (a required shared library) looks like this. ldd ./opt/qbes7/util/qbmonitord ./opt/qbes7/util/qbmonitord: libfam.so.0 = not found libpthread.so.0 = /lib/libpthread.so.0 (0x28072000) libstdc++.so.6 = /usr/lib/libstdc++.so.6 (0x28088000) libm.so.6 = /lib/libm.so.6 (0x28171000) libgcc_s.so.1 = /lib/libgcc_s.so.1 (0x28198000) libc.so.6 = /lib/libc.so.6 (0x281a4000) /lib/ld-linux.so.2 (0x28054000) I install fam to get rid of the not found, perform the following link: ln /usr/local/lib/libfam.so.0 /compat/linux/lib/libfam.so.0 and then I get this: ldd ./opt/qbes7/util/qbmonitord ./opt/qbes7/util/qbmonitord: ./opt/qbes7/util/qbmonitord: error while loading shared libraries: / lib/libfam.so.0: ELF file OS ABI invalid ./opt/qbes7/util/qbmonitord: exit status 127 which kind of makes sense since this library is not a linux library. I'd read that I don't need to brandelf -t linux a library but I tried that anyway, realizing it was likely meaningless (or harmful). It didn't help of course. My next thought was to try and get a libfam.so.0 binary from a linux distro but stopped when it occurred to me that it would be illogical since fam uses kqueue on FreeBSD rather than something called imon. imon is not available for FreeBSD so a linux version shouldn't be able to function if it expects that. On FreeBSD, fam configures itself to not use imon. What is the appropriate course of action to get a linux flavor shared library for fam (or anything which runs into such conflicts) that will work on FreeBSD yet be recognized as suitable for linux under the compat mode? Try to create and use linux-fam port. WBR -- bsam ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Linking libraries for compat_linux
On Dec 20, 2008, at 6:05 AM, Boris Samorodov wrote: On Fri, 19 Dec 2008 09:46:03 -0800 Chris wrote: This question is may be better unswered at emulation@ ML. Oops, I didn't ever notice that list as I've never needed Linux before. I hate to trouble development lists with an operational issue but this one is starting to look like an incompatibility that is beyond me. The Linux and FreeBSD versions of gamin both fail on inotify_init. Not having the source to the program I'm trying to run makes it very difficult to fix even though the functionality is there (perhaps even superior) on FreeBSD. I ended up using the linux libfam.so.0 from the gamin distribution for Fedora 9. Using it's server fails instantly, using the freebsd port version, the server doesn't fail until the Linux client library attempts to connect. Then it too gets inotify_init not implemented. The Fam list appears to be defunct and I've not yet tried the direct mail contact to the gamin development page. I'm assuming the answer would be that you use native FreeBSD libfam.so on FreeBSD and the linux version on Linux. I've no way to tell the Intuit daemon to do that because of the ABI error and I presume there is an underlying reason why a native library can't be used by a linux binary. I will try the other list if no one has run into a similar problem with other Linux apps. I may be kicking a dead horse but it seems others have talked about using FreeBSD in this manner and it makes it an interesting challenge. The time I'm investing in this is probably not any more time that it would take to configure and secure an openSUSE or Fedora system (having never bothered with them before). Plus it would mean not adding an additional server into my net just for a trivial SMB/file monitoring application. Thanks for the response. I've bumped into a library I can't resolve and I must have a disconnect in how the linux_compat works because I can't see how it could be solved. I have the following: * compat_linux enabled in the kernel, * /usr/ports/emulators/linux_base_fc7 * sysctl kern.fallback_elf_brand=3 * rpm2cpio to alter rpms * cpio to create the directories and place the files where they belong in /compat/linux. I have a program that now has all it's libraries resolved but one in preparation to attempt to run the Linux Quickbooks install on FreeBSD. The ldd output, prior to installing /usr/ports/devel/fam (a required shared library) looks like this. ldd ./opt/qbes7/util/qbmonitord ./opt/qbes7/util/qbmonitord: libfam.so.0 = not found libpthread.so.0 = /lib/libpthread.so.0 (0x28072000) libstdc++.so.6 = /usr/lib/libstdc++.so.6 (0x28088000) libm.so.6 = /lib/libm.so.6 (0x28171000) libgcc_s.so.1 = /lib/libgcc_s.so.1 (0x28198000) libc.so.6 = /lib/libc.so.6 (0x281a4000) /lib/ld-linux.so.2 (0x28054000) I install fam to get rid of the not found, perform the following link: ln /usr/local/lib/libfam.so.0 /compat/linux/lib/libfam.so.0 and then I get this: ldd ./opt/qbes7/util/qbmonitord ./opt/qbes7/util/qbmonitord: ./opt/qbes7/util/qbmonitord: error while loading shared libraries: / lib/libfam.so.0: ELF file OS ABI invalid ./opt/qbes7/util/qbmonitord: exit status 127 which kind of makes sense since this library is not a linux library. I'd read that I don't need to brandelf -t linux a library but I tried that anyway, realizing it was likely meaningless (or harmful). It didn't help of course. My next thought was to try and get a libfam.so.0 binary from a linux distro but stopped when it occurred to me that it would be illogical since fam uses kqueue on FreeBSD rather than something called imon. imon is not available for FreeBSD so a linux version shouldn't be able to function if it expects that. On FreeBSD, fam configures itself to not use imon. What is the appropriate course of action to get a linux flavor shared library for fam (or anything which runs into such conflicts) that will work on FreeBSD yet be recognized as suitable for linux under the compat mode? Try to create and use linux-fam port. I also tried this but it appears that gamin is a more recent implementation. It also provides the libfam.so.0. WBR -- bsam ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions- unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Linking libraries for compat_linux
I've bumped into a library I can't resolve and I must have a disconnect in how the linux_compat works because I can't see how it could be solved. I have the following: * compat_linux enabled in the kernel, * /usr/ports/emulators/linux_base_fc7 * sysctl kern.fallback_elf_brand=3 * rpm2cpio to alter rpms * cpio to create the directories and place the files where they belong in /compat/linux. I have a program that now has all it's libraries resolved but one in preparation to attempt to run the Linux Quickbooks install on FreeBSD. The ldd output, prior to installing /usr/ports/devel/fam (a required shared library) looks like this. ldd ./opt/qbes7/util/qbmonitord ./opt/qbes7/util/qbmonitord: libfam.so.0 = not found libpthread.so.0 = /lib/libpthread.so.0 (0x28072000) libstdc++.so.6 = /usr/lib/libstdc++.so.6 (0x28088000) libm.so.6 = /lib/libm.so.6 (0x28171000) libgcc_s.so.1 = /lib/libgcc_s.so.1 (0x28198000) libc.so.6 = /lib/libc.so.6 (0x281a4000) /lib/ld-linux.so.2 (0x28054000) I install fam to get rid of the not found, perform the following link: ln /usr/local/lib/libfam.so.0 /compat/linux/lib/libfam.so.0 and then I get this: ldd ./opt/qbes7/util/qbmonitord ./opt/qbes7/util/qbmonitord: ./opt/qbes7/util/qbmonitord: error while loading shared libraries: / lib/libfam.so.0: ELF file OS ABI invalid ./opt/qbes7/util/qbmonitord: exit status 127 which kind of makes sense since this library is not a linux library. I'd read that I don't need to brandelf -t linux a library but I tried that anyway, realizing it was likely meaningless (or harmful). It didn't help of course. My next thought was to try and get a libfam.so.0 binary from a linux distro but stopped when it occurred to me that it would be illogical since fam uses kqueue on FreeBSD rather than something called imon. imon is not available for FreeBSD so a linux version shouldn't be able to function if it expects that. On FreeBSD, fam configures itself to not use imon. What is the appropriate course of action to get a linux flavor shared library for fam (or anything which runs into such conflicts) that will work on FreeBSD yet be recognized as suitable for linux under the compat mode? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Linking amd64 binary with a 32-bit linux library
My knowledge of compilers is insufficient to answer this question. I'm currently going through the process of installing a 32-bit version of Matlab onto FreeBSD 7.0 amd64. In fact, Matlab itself has been installed and seems to be running fine (albeit without a GUI due to some java-related issues). The next thing I need to do is to build a library (matlab.so) that will allow ruby scripts to access the Matlab Engine. This library must be usable by mod_ruby, which is compiled for FreeBSD from ports, but it must use the 32-bit linux libraries from Matlab to do the actual work. Is such compilation possible? The exact commands that I would use on a linux system (minus changes in paths) are the following: swig -ruby matlab.i cc -c -shared matlab_wrap.c -I/usr/local/lib/ruby/1.8/amd64-freebsd7/ -I/compat/linux/usr/local/matlab-7.0.4/extern/include -fPIC cc -shared matlab_wrap.o -L/compat/linux/usr/local/matlab-7.0.4/bin/glnx86 -lmat -leng -o matlab.so The matlab.i file is something that we wrote to use Matlab Engine in ruby, swig is used to create C code. On a linux system these three lines give me matlab.so library that can then be loaded from ruby via require 'matlab' command. On FreeBSD I get this for the third command: /usr/bin/ld: skipping incompatible /compat/linux/usr/local/matlab-7.0.4/bin/glnx86/libmat.so when searching for -lmat /usr/bin/ld: cannot find -lmat I take it that this happens because libmat.so is a linux binary, but is there any way to do what I'm after? - Max ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Linking amd64 binary with a 32-bit linux library
Maxim Khitrov wrote: I take it that this happens because libmat.so is a linux binary, but is there any way to do what I'm after? You can't mix and match Linux and FreeBSD code in the same binary. You will have to make a completely Linux binary, either by compiling on a Linux system, or by installing a Linux toolchain into a chroot and building there. Kris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Linking amd64 binary with a 32-bit linux library
On Thu, Aug 7, 2008 at 2:03 PM, Kris Kennaway [EMAIL PROTECTED] wrote: Maxim Khitrov wrote: I take it that this happens because libmat.so is a linux binary, but is there any way to do what I'm after? You can't mix and match Linux and FreeBSD code in the same binary. You will have to make a completely Linux binary, either by compiling on a Linux system, or by installing a Linux toolchain into a chroot and building there. Kris I thought so. In that case, if I need to have this library loaded by mod_ruby, and mod_ruby loaded by apache, I take it that I will have to recompile all of these as linux binaries if I want to interface with matlab? I guess I should have thought about this first. :-\ - Max ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Linking amd64 binary with a 32-bit linux library
Maxim Khitrov wrote: On Thu, Aug 7, 2008 at 2:03 PM, Kris Kennaway [EMAIL PROTECTED] wrote: Maxim Khitrov wrote: I take it that this happens because libmat.so is a linux binary, but is there any way to do what I'm after? You can't mix and match Linux and FreeBSD code in the same binary. You will have to make a completely Linux binary, either by compiling on a Linux system, or by installing a Linux toolchain into a chroot and building there. Kris I thought so. In that case, if I need to have this library loaded by mod_ruby, and mod_ruby loaded by apache, I take it that I will have to recompile all of these as linux binaries if I want to interface with matlab? I guess I should have thought about this first. :-\ If you have to run them all in the same process, then yes. Depending on what you are trying to achieve you may be able to use another form of IPC to interface them (e.g. socket, shared memory, etc). Kris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Mixing 64 and 32-bit code (was: Linking amd64 binary with a 32-bit linux library)
Kris Kennaway ha scritto: You can't mix and match Linux and FreeBSD code in the same binary. Sorry for stepping in, but I have a similar question I asked in the past and didn't get any answer: is it possible to mix and match 32-bit and 64-bit FreeBSD code? I have a closed source 32-bit library which I'd like to link to on a 64-bit system... bye Thanks av. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Mixing 64 and 32-bit code (was: Linking amd64 binary with a 32-bit linux library)
On Aug 7, 2008, at 12:31 PM, Andrea Venturoli wrote: You can't mix and match Linux and FreeBSD code in the same binary. Sorry for stepping in, but I have a similar question I asked in the past and didn't get any answer: is it possible to mix and match 32-bit and 64-bit FreeBSD code? I have a closed source 32-bit library which I'd like to link to on a 64-bit system... The simplest answer is that it won't work-- the syscall interface and function argument/return-value sizes are going to be different between 32-bit and 64-bit code. If you have 32-bit code compiled with -fPIC which doesn't make any system calls, and is using all C99 datatypes (rather than native datatypes like int or long which are going to change in size under an ILP64 environment), well, that might be linkable into a 64-bit binary, but even so I wouldn't count on it to work without a translation shim. [1] Regards, -- -Chuck [1]: You can look up how thunking between Win16 and Win32 code worked here: http://en.wikipedia.org/wiki/Thunk#Thunk_as_compatibility_mapping ...but the same idea could be applied to generic 32-bit 64-bit ELF code. (It's really an evil thing to try to do, however.) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Linking amd64 binary with a 32-bit linux library
In the last episode (Aug 07), Maxim Khitrov said: On Thu, Aug 7, 2008 at 2:03 PM, Kris Kennaway [EMAIL PROTECTED] wrote: Maxim Khitrov wrote: I take it that this happens because libmat.so is a linux binary, but is there any way to do what I'm after? You can't mix and match Linux and FreeBSD code in the same binary. You will have to make a completely Linux binary, either by compiling on a Linux system, or by installing a Linux toolchain into a chroot and building there. I thought so. In that case, if I need to have this library loaded by mod_ruby, and mod_ruby loaded by apache, I take it that I will have to recompile all of these as linux binaries if I want to interface with matlab? I guess I should have thought about this first. :-\ You'll have to build a Linux ruby, but you can use FastCGI (or an equivalent system) to run your CGIs in a separate process, so you can still run a native apache. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Why this linking fail?
On Thursday 17 July 2008 07:37:43 Unga wrote: --- On Thu, 7/17/08, Unga [EMAIL PROTECTED] wrote: Sorry guys, I have found an issue. In the libc compile log shows following error: lex -P_nsyy -o/dev/stdout /usr/src/lib/libc/net/nslexer.l | sed -e '/YY_BUF_SIZE/s/16384/1024/' | nslexer.c lex: fatal internal error, exec failed Let me check why the lex failed. Ok, I managed to narrow down the problem. I'm in a chroot jail. lex -P_nsyy -o/dev/stdout /usr/src/lib/libc/net/nslexer.l nslexer.c lex: could not create /dev/stdout ls -l /dev/stdout lrwxr-xr-x 1 root wheel 4 Jul 17 12:24 /dev/stdout - fd/1 ls -l /dev/fd/ crw-rw-rw- 1 root wheel0, 17 Jul 17 10:30 0 crw-rw-rw- 1 root wheel0, 19 Jul 17 10:30 1 crw-rw-rw- 1 root wheel0, 21 Jul 17 10:30 2 echo xxx /dev/stdout xxx Note, writing /dev/stdout works, it prints back the xxx. Before I enter into chroot jail, this is how mount devfs: mount -v -o rw -t devfs dev /somepath/dev Usually, it's: mount -t devfs devfs /somepath/dev ^^ However, I don't know if that token distinction matters or that it's just a label. But this statement works well outside of jail: lex -P_nsyy -o/dev/stdout /usr/src/lib/libc/net/nslexer.l nslexer.c Is my devfs mount correct? I did not do any devfs configuration. Does it require any devfs configuration on the new /somepath/dev mount? Appreciate very much your reply on this. This can be a problem, if you jexec into the jail as no full environment is created, but it's usually just the /dev/tty that is the problem, not std{out| err|null}. Have you considered compiling on the host and using DESTDIR on installworld? -- Mel Problem with today's modular software: they start with the modules and never get to the software part. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Why this linking fail?
Hi all I have compiled and installed following libraries separately: /usr/src/lib/csu /usr/src/lib/libc /usr/src/lib/msun When I link to them, I get following errors: /usr/lib/libc.so: undefined reference to `_nsyylex' /usr/lib/libc.so: undefined reference to `_nsyyin' /usr/lib/libc.so: undefined reference to `_nsyytext' /usr/lib/libc.so: undefined reference to `_nsyyerror' /usr/lib/libc.so: undefined reference to `_nsyylineno' collect2: ld returned 1 exit status Search for those names shows following: cd /usr/src/ grep -lr _nsyylex . ./include/nsswitch.h ./lib/libc/net/Symbol.map grep -lr _nsyyin . ./lib/libc/net/nsdispatch.c grep -lr _nsyytext . ./lib/libc/net/nsparser.y grep -lr _nsyyerror . ./include/nsswitch.h ./lib/libc/net/Symbol.map ./lib/libc/net/nslexer.l grep -lr _nsyylineno . ./include/nsswitch.h ./lib/libc/net/Symbol.map ./lib/libc/net/nsparser.y That is, they are all from /usr/src/lib/libc/net. Does this means the /usr/src/lib/libc/net is not in the new libc.so.7? What does above errors shows? Appreciate your help in this regard. Many thanks in advance. Kind regards Unga ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Why this linking fail?
--- On Thu, 7/17/08, Unga [EMAIL PROTECTED] wrote: From: Unga [EMAIL PROTECTED] Subject: Why this linking fail? To: freebsd-questions@freebsd.org Date: Thursday, July 17, 2008, 11:28 AM Hi all I have compiled and installed following libraries separately: /usr/src/lib/csu /usr/src/lib/libc /usr/src/lib/msun When I link to them, I get following errors: /usr/lib/libc.so: undefined reference to `_nsyylex' /usr/lib/libc.so: undefined reference to `_nsyyin' /usr/lib/libc.so: undefined reference to `_nsyytext' /usr/lib/libc.so: undefined reference to `_nsyyerror' /usr/lib/libc.so: undefined reference to `_nsyylineno' collect2: ld returned 1 exit status Search for those names shows following: cd /usr/src/ grep -lr _nsyylex . ./include/nsswitch.h ./lib/libc/net/Symbol.map grep -lr _nsyyin . ./lib/libc/net/nsdispatch.c grep -lr _nsyytext . ./lib/libc/net/nsparser.y grep -lr _nsyyerror . ./include/nsswitch.h ./lib/libc/net/Symbol.map ./lib/libc/net/nslexer.l grep -lr _nsyylineno . ./include/nsswitch.h ./lib/libc/net/Symbol.map ./lib/libc/net/nsparser.y That is, they are all from /usr/src/lib/libc/net. Does this means the /usr/src/lib/libc/net is not in the new libc.so.7? What does above errors shows? Appreciate your help in this regard. Many thanks in advance. Sorry guys, I have found an issue. In the libc compile log shows following error: lex -P_nsyy -o/dev/stdout /usr/src/lib/libc/net/nslexer.l | sed -e '/YY_BUF_SIZE/s/16384/1024/' nslexer.c lex: fatal internal error, exec failed Let me check why the lex failed. Unga ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Why this linking fail?
--- On Thu, 7/17/08, Unga [EMAIL PROTECTED] wrote: Sorry guys, I have found an issue. In the libc compile log shows following error: lex -P_nsyy -o/dev/stdout /usr/src/lib/libc/net/nslexer.l | sed -e '/YY_BUF_SIZE/s/16384/1024/' nslexer.c lex: fatal internal error, exec failed Let me check why the lex failed. Ok, I managed to narrow down the problem. I'm in a chroot jail. lex -P_nsyy -o/dev/stdout /usr/src/lib/libc/net/nslexer.l nslexer.c lex: could not create /dev/stdout ls -l /dev/stdout lrwxr-xr-x 1 root wheel 4 Jul 17 12:24 /dev/stdout - fd/1 ls -l /dev/fd/ crw-rw-rw- 1 root wheel0, 17 Jul 17 10:30 0 crw-rw-rw- 1 root wheel0, 19 Jul 17 10:30 1 crw-rw-rw- 1 root wheel0, 21 Jul 17 10:30 2 echo xxx /dev/stdout xxx Note, writing /dev/stdout works, it prints back the xxx. Before I enter into chroot jail, this is how mount devfs: mount -v -o rw -t devfs dev /somepath/dev But this statement works well outside of jail: lex -P_nsyy -o/dev/stdout /usr/src/lib/libc/net/nslexer.l nslexer.c Is my devfs mount correct? I did not do any devfs configuration. Does it require any devfs configuration on the new /somepath/dev mount? Appreciate very much your reply on this. Unga ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
forcing compilation/run time linking of lib32 on amd64
I am writing some demo code (for teaching C) and need to have the same program run on a 32 bit machine and a 64 bit machine (showing that int's are always word length)... I have 8-current amd64 how do I force it to compile with 32 bit words? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: forcing compilation/run time linking of lib32 on amd64
I am writing some demo code (for teaching C) and need to have the same program run on a 32 bit machine and a 64 bit machine (showing that int's are always word length)... I have 8-current amd64 how do I force it to compile with 32 bit words? Add the following to your gcc command line: -m32 -B/usr/lib32 -L/usr/lib32 Regards, Josh ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: forcing compilation/run time linking of lib32 on amd64
On Wed, 24 Oct 2007 16:49:24 -0400 Aryeh M. Friedman [EMAIL PROTECTED] wrote: I am writing some demo code (for teaching C) ... showing that int's are always word length s/always/typically/ C has been around for a long time and there is always a counter-example to any sweeping generalisation that isn't backed-up by a standards document. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: forcing compilation/run time linking of lib32 on amd64
RW wrote: On Wed, 24 Oct 2007 16:49:24 -0400 Aryeh M. Friedman [EMAIL PROTECTED] wrote: I am writing some demo code (for teaching C) ... showing that int's are always word length s/always/typically/ C has been around for a long time and there is always a counter-example to any sweeping generalisation that isn't backed-up by a standards document. BTW I was slightly wrong it is longs not int's that change depending on word size: Script started on Wed Oct 24 19:51:44 2007 cat sizes.c #include stdio.h main() { printf(int:\t\t%d\n,sizeof(int)); printf(short:\t\t%d\n,sizeof(short)); printf(long:\t\t%d\n,sizeof(long)); printf(long long:\t%d\n,sizeof(long long)); printf(float:\t\t%d\n,sizeof(float)); printf(double:\t\t%d\n,sizeof(double)); printf(char:\t\t%d\n,sizeof(char)); printf(ptr:\t\t%d\n,sizeof(void *)); } gcc sizes.c ./a.out int:4 short:2 long:8 long long:8 float:4 double:8 char:1 ptr:8 gcc -m32 -B/usr/lib32 -L/usr/lib32 sizes.c # See forcing compilor/run time linking of lib32 on amd54 in freebsd-questions ./a.out int:4 short:2 long:4 long long:8 float:4 double:8 char:1 ptr:4 Script done on Wed Oct 24 19:52:08 2007 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: forcing compilation/run time linking of lib32 on amd64
On Wed, 24 Oct 2007 21:56:50 -0400 Aryeh M. Friedman [EMAIL PROTECTED] wrote: RW wrote: On Wed, 24 Oct 2007 16:49:24 -0400 Aryeh M. Friedman [EMAIL PROTECTED] wrote: I am writing some demo code (for teaching C) ... showing that int's are always word length s/always/typically/ C has been around for a long time and there is always a counter-example to any sweeping generalisation that isn't backed-up by a standards document. BTW I was slightly wrong it is longs not int's that change depending on word size: What's variable is defined by the standard, not by the differences between particular implementations. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: forcing compilation/run time linking of lib32 on amd64
On Oct 24, 2007, at 8:56 PM, Aryeh M. Friedman wrote: RW wrote: On Wed, 24 Oct 2007 16:49:24 -0400 Aryeh M. Friedman [EMAIL PROTECTED] wrote: I am writing some demo code (for teaching C) ... showing that int's are always word length s/always/typically/ C has been around for a long time and there is always a counter-example to any sweeping generalisation that isn't backed-up by a standards document. BTW I was slightly wrong it is longs not int's that change depending on word size: Script started on Wed Oct 24 19:51:44 2007 Just remember this, char = short = int = long. Anything else can be anything. Saying that an int is always four bytes is like saying an int is the same size as a pointer, both of which are assumptions that are often taken but are very wrong. A lot of what decides the sizes of ints is more compiler implementer than anything else. Depending on your system, you'd want your 36 bit ints instead of being limited to only 32. But if you don't care about portability, then an int is always 32 bits and it's always in little endian order. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: OpenEXR linking error
On Oct 12, 2007, at 6:09 AM, [EMAIL PROTECTED] wrote: Thanks, Philipp. At least I know that it is me. It's not just you. I've been following the instructions in /usr/ ports/UPDATING and have been getting the exact failure you describe when trying to build OpenEXR. I'm using 6.2-RELENG Cheers, -j -- Jeffrey Goldberghttp://www.goldmark.org/jeff/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On 07/10/2007, at 12:56 AM, andrew clarke wrote: On Sat, Oct 06, 2007 at 04:54:26AM +1000, Jerahmy Pocott wrote: I'm wanting to use BASH as my root shell, so I compiled a statically linked version then tried to log in with only / mounted. But I was locked out because elf.ld.so could not be found.. I though elf was the native binary format these days? But it needs a library to run them? Is it possible to statically link against elf? Or do standalone binary have to be in aout format? I'm a bit confused as to why it requires this dynamic library.. I'm not sure if this helps at all, but you can build a static version of bash from the Ports tree: cd /usr/ports/shells/bash make WITH_STATIC_BASH=1 You'll need to cp bash to /bin. Thanks, that was the information I was looking for! I didn't know about that option to the port.. The problem seemed to be with the dependancies, libintl is dynamically linked to libiconv and some how that was causing it to build with a dynamic link.. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On Fri, 2007-10-05 at 23:25 -0600, Old Ranger wrote: [...snip...] Want the best you can get? Use tcsh as a shell and let the linux ^^^ +1 Sincerely, -- Byung-Hee HWANG [EMAIL PROTECTED] This domain(izb.knu.ac.kr) is testing DKIM(RFC4871); flag: t=y. If you encounter strange problems, please have a look at http://www.ietf.org/rfc/rfc4871.txt before throwing stones at me :-) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
Am Samstag 06 Oktober 2007 07:25:39 schrieb Old Ranger: BASH is not a UNIX shell. BASH occurred with Linux then carried over into FreeBSD. Get your history straight and read up on the heritage of the bash on gnu.org, please. BEFORE you start making absurd comments like these. (as if the bash was written FOR Linux...?) -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On 06/10/2007, at 3:25 PM, Old Ranger wrote: Hey look, BASH is not a UNIX shell. BASH occurred with Linux then carried over into FreeBSD. While it has some advantages, it is still a bastard. UNIX is written in C Want the best you can get? Use tcsh as a shell and let the linux community do whatever they want. I know a lot of elitists detest BASH, especially in the Linux camp (probably because zomg we can't use the default shell, we might be conforming to something and that's totally un-linuxy). But BASH is an excellent shell with most of the features from csh and ksh as well as the ability to run sh scripts. It was built to be POSIX compliant, not built for linux.. But this is all besides the point, I didn't ask what people think of BASH . I didn't ask how to set it as the root shell, what I asked about was creating a statically linked binary of BASH so that I COULD use it as the root shell! So that it could be used without /usr mountable.. Oh well.. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On Sat, Oct 06, 2007 at 05:52 [EMAIL PROTECTED] said 'Who you talkin' to? You talkin' to [EMAIL PROTECTED] I didn't do nuttin'. I said: Date: Fri, 5 Oct 2007 20:09:46 -0400 From: Jerry McAllister [EMAIL PROTECTED] Subject: Re: BASH as root shell (static linking) On Sat, Oct 06, 2007 at 12:32:22AM +0100, RW wrote: On Fri, 5 Oct 2007 16:29:36 -0700 (PDT) Philip Hallstrom [EMAIL PROTECTED] wrote: On 06/10/2007, at 5:45 AM, RW wrote: On Sat, 6 Oct 2007 04:54:26 +1000 Jerahmy Pocott [EMAIL PROTECTED] wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked ... [deletia - wjv] Or, maybe the OP managed to get it put in the /etc/passwd entry. Anyway, I prefer tcsh, but if the OP just has to have it bash, it is easy to do. All the OP has to do is install bash from /usr/ports/shells/bash and then edit /etc/passwd to change the last field for toor - after the last colon - to point to where it installs bash (/usr/local/bin/bash maybe) and then it should all be fine. No really - because in the original post the OP says he wanted to use this when only / was mounted. That means he should put his bash in /bin and make an entry to the /etc/shells. I do with ksh - my prefered shell for the last umpteen years. If you do have a shell you want to use all the time it had better be in /bin cause you will be lost if you get into single user mode from something like a crash and need to run utilities. Bill -- Bill Vermillion - bv @ wjv . com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On Sat, Oct 06, 2007 at 04:54:26AM +1000, Jerahmy Pocott wrote: I'm wanting to use BASH as my root shell, so I compiled a statically linked version then tried to log in with only / mounted. But I was locked out because elf.ld.so could not be found.. I though elf was the native binary format these days? But it needs a library to run them? Is it possible to statically link against elf? Or do standalone binary have to be in aout format? I'm a bit confused as to why it requires this dynamic library.. I'm not sure if this helps at all, but you can build a static version of bash from the Ports tree: cd /usr/ports/shells/bash make WITH_STATIC_BASH=1 You'll need to cp bash to /bin. Regards Andrew ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On Friday 05 October 2007 22:51:53 Jerahmy Pocott wrote: On 06/10/2007, at 4:59 AM, Brian A. Seklecki wrote: On Sat, 2007-10-06 at 04:54 +1000, Jerahmy Pocott wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked version then tried to log in with only / mounted. But I was locked out because elf.ld.so could not be found.. JP: Did: $ ldd /bin/bash Return anything? It should not. It's saying: libintl.so.6 = /usr/local/lib/libintl.so.6 (0x2819d000) libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x281a6000) Most likely because you thought changing CFLAGS/LDFLAGS during port build, would make it statically linked, however if the link command has additional -Wl,-dynamic statements caused by `foo-config --libs` or .la files, then linker will resolve those libraries dynamically. As another poster stated in this thread, use the static option of the port. -- Mel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On Saturday 06 October 2007 11:56:03 andrew clarke wrote: On Sat, Oct 06, 2007 at 04:54:26AM +1000, Jerahmy Pocott wrote: I'm wanting to use BASH as my root shell, so I compiled a statically linked version then tried to log in with only / mounted. But I was locked out because elf.ld.so could not be found.. I though elf was the native binary format these days? But it needs a library to run them? Is it possible to statically link against elf? Or do standalone binary have to be in aout format? I'm a bit confused as to why it requires this dynamic library.. I'm not sure if this helps at all, but you can build a static version of bash from the Ports tree: cd /usr/ports/shells/bash make WITH_STATIC_BASH=1 You'll need to cp bash to /bin. Regards Andrew Exactly. As a portupgrade user i've done in my pkgtools.conf: MAKE_ARGS = { 'shells/bash' = [ 'WITH_STATIC_BASH=yes', ], } AFTERINSTALL = { 'shells/bash' = 'cp /usr/local/bin/bash /bin' } And no more troubles even after portupgrade shells/bash :)) Aline ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On Sat, Oct 06, 2007 at 01:55:28AM +0100, RW wrote: On Fri, 5 Oct 2007 20:09:46 -0400 Jerry McAllister [EMAIL PROTECTED] wrote: On Sat, Oct 06, 2007 at 12:32:22AM +0100, RW wrote: On Fri, 5 Oct 2007 16:29:36 -0700 (PDT) Philip Hallstrom [EMAIL PROTECTED] wrote: On 06/10/2007, at 5:45 AM, RW wrote: On Sat, 6 Oct 2007 04:54:26 +1000 Jerahmy Pocott [EMAIL PROTECTED] wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked I would suggest using bash as your toor shell instead. toor exist precisely for this purpose. Yeah, I'v done that in the past, but I really dislike csh, I don't want to use it EVER =p I don't understand, why would you see csh if you login as toor It has no shell in the /etc/passwd entry by default. Maybe it then defaults to csh (which is really tcsh) if nothing else is given. It defaults to sh Anyway, I prefer tcsh, but if the OP just has to have it bash, it is easy to do. I actually value my ignorance of tcsh, it prevents me doing anything ambitious if I forget where I am. Explicitly selecting another shell is like a safety-catch. And tsch is fairly friendly without knowing much about it. All the OP has to do is install bash from /usr/ports/shells/bash and then edit /etc/passwd to change the last field for toor - after the last colon - to point to where it installs bash (/usr/local/bin/bash maybe) and then it should all be fine. Actually, I forgot to mention that you also have to then put bash in /etc/shells. jerry Yes , that's what it's for. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On Sat, 2007-10-06 at 04:54 +1000, Jerahmy Pocott wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked version then tried to log in with only / mounted. But I was locked out because elf.ld.so could not be found.. JP: Did: $ ldd /bin/bash Return anything? It should not. ~BAS ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
BASH as root shell (static linking)
Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked version then tried to log in with only / mounted. But I was locked out because elf.ld.so could not be found.. I though elf was the native binary format these days? But it needs a library to run them? Is it possible to statically link against elf? Or do standalone binary have to be in aout format? I'm a bit confused as to why it requires this dynamic library.. Thanks! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On Sat, 6 Oct 2007 04:54:26 +1000 Jerahmy Pocott [EMAIL PROTECTED] wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked I would suggest using bash as your toor shell instead. toor exist precisely for this purpose. http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/book.html#TOOR-ACCOUNT ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On 06/10/2007, at 4:59 AM, Brian A. Seklecki wrote: On Sat, 2007-10-06 at 04:54 +1000, Jerahmy Pocott wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked version then tried to log in with only / mounted. But I was locked out because elf.ld.so could not be found.. JP: Did: $ ldd /bin/bash Return anything? It should not. It's saying: libintl.so.6 = /usr/local/lib/libintl.so.6 (0x2819d000) libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x281a6000) Why is it linking these dynamically? It's not linking ncurses or libc dynamically.. Thanks! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On 06/10/2007, at 5:45 AM, RW wrote: On Sat, 6 Oct 2007 04:54:26 +1000 Jerahmy Pocott [EMAIL PROTECTED] wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked I would suggest using bash as your toor shell instead. toor exist precisely for this purpose. Yeah, I'v done that in the past, but I really dislike csh, I don't want to use it EVER =p ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On 06/10/2007, at 5:45 AM, RW wrote: On Sat, 6 Oct 2007 04:54:26 +1000 Jerahmy Pocott [EMAIL PROTECTED] wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked I would suggest using bash as your toor shell instead. toor exist precisely for this purpose. Yeah, I'v done that in the past, but I really dislike csh, I don't want to use it EVER =p Use sudo... and alias 'su' to 'sudo -H bash'. That's what I do... but can always fall back to the default if necessary. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On Fri, 5 Oct 2007 16:29:36 -0700 (PDT) Philip Hallstrom [EMAIL PROTECTED] wrote: On 06/10/2007, at 5:45 AM, RW wrote: On Sat, 6 Oct 2007 04:54:26 +1000 Jerahmy Pocott [EMAIL PROTECTED] wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked I would suggest using bash as your toor shell instead. toor exist precisely for this purpose. Yeah, I'v done that in the past, but I really dislike csh, I don't want to use it EVER =p I don't understand, why would you see csh if you login as toor ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On Sat, Oct 06, 2007 at 12:32:22AM +0100, RW wrote: On Fri, 5 Oct 2007 16:29:36 -0700 (PDT) Philip Hallstrom [EMAIL PROTECTED] wrote: On 06/10/2007, at 5:45 AM, RW wrote: On Sat, 6 Oct 2007 04:54:26 +1000 Jerahmy Pocott [EMAIL PROTECTED] wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked I would suggest using bash as your toor shell instead. toor exist precisely for this purpose. Yeah, I'v done that in the past, but I really dislike csh, I don't want to use it EVER =p I don't understand, why would you see csh if you login as toor It has no shell in the /etc/passwd entry by default. Maybe it then defaults to csh (which is really tcsh) if nothing else is given. Seems strange if it does that, but??? Or, maybe the OP managed to get it put in the /etc/passwd entry. Anyway, I prefer tcsh, but if the OP just has to have it bash, it is easy to do. All the OP has to do is install bash from /usr/ports/shells/bash and then edit /etc/passwd to change the last field for toor - after the last colon - to point to where it installs bash (/usr/local/bin/bash maybe) and then it should all be fine. jerry ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
On Fri, 5 Oct 2007 20:09:46 -0400 Jerry McAllister [EMAIL PROTECTED] wrote: On Sat, Oct 06, 2007 at 12:32:22AM +0100, RW wrote: On Fri, 5 Oct 2007 16:29:36 -0700 (PDT) Philip Hallstrom [EMAIL PROTECTED] wrote: On 06/10/2007, at 5:45 AM, RW wrote: On Sat, 6 Oct 2007 04:54:26 +1000 Jerahmy Pocott [EMAIL PROTECTED] wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked I would suggest using bash as your toor shell instead. toor exist precisely for this purpose. Yeah, I'v done that in the past, but I really dislike csh, I don't want to use it EVER =p I don't understand, why would you see csh if you login as toor It has no shell in the /etc/passwd entry by default. Maybe it then defaults to csh (which is really tcsh) if nothing else is given. It defaults to sh Anyway, I prefer tcsh, but if the OP just has to have it bash, it is easy to do. I actually value my ignorance of tcsh, it prevents me doing anything ambitious if I forget where I am. Explicitly selecting another shell is like a safety-catch. And tsch is fairly friendly without knowing much about it. All the OP has to do is install bash from /usr/ports/shells/bash and then edit /etc/passwd to change the last field for toor - after the last colon - to point to where it installs bash (/usr/local/bin/bash maybe) and then it should all be fine. Yes , that's what it's for. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
RW wrote: On Fri, 5 Oct 2007 20:09:46 -0400 Jerry McAllister [EMAIL PROTECTED] wrote: On Sat, Oct 06, 2007 at 12:32:22AM +0100, RW wrote: On Fri, 5 Oct 2007 16:29:36 -0700 (PDT) Philip Hallstrom [EMAIL PROTECTED] wrote: On 06/10/2007, at 5:45 AM, RW wrote: On Sat, 6 Oct 2007 04:54:26 +1000 Jerahmy Pocott [EMAIL PROTECTED] wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked I would suggest using bash as your toor shell instead. toor exist precisely for this purpose. Yeah, I'v done that in the past, but I really dislike csh, I don't want to use it EVER =p I don't understand, why would you see csh if you login as toor It has no shell in the /etc/passwd entry by default. Maybe it then defaults to csh (which is really tcsh) if nothing else is given. It defaults to sh Anyway, I prefer tcsh, but if the OP just has to have it bash, it is easy to do. I actually value my ignorance of tcsh, it prevents me doing anything ambitious if I forget where I am. Explicitly selecting another shell is like a safety-catch. And tsch is fairly friendly without knowing much about it. All the OP has to do is install bash from /usr/ports/shells/bash and then edit /etc/passwd to change the last field for toor - after the last colon - to point to where it installs bash (/usr/local/bin/bash maybe) and then it should all be fine. Yes , that's what it's for. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Hey look, BASH is not a UNIX shell. BASH occurred with Linux then carried over into FreeBSD. While it has some advantages, it is still a bastard. UNIX is written in C Want the best you can get? Use tcsh as a shell and let the linux community do whatever they want. SHEESH Z. Wade Hampton A UNIX person ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Linking error with __float128 conversions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hello. I had problem in linking error with __float128 conversion functions. I am using FreeBSD/amd64 -current and test code is below. #include strings.h int main(void) { __float128 a; long double b; bzero(a, sizeof(__float128)); bzero(b, sizeof(long double)); a = b; b = a; return (0); } When I build above code, I got linking error. Is this just unsupported functions or something missing in header or linking options? Error message is below. [EMAIL PROTECTED]/tmp : uname -a FreeBSD localhost.localdomain 7.0-CURRENT FreeBSD 7.0-CURRENT #54: Sat Apr 21 03:00:42 KST 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/EZ8KERNEL amd64 [EMAIL PROTECTED]/tmp : gcc -v Using built-in specs. Configured with: FreeBSD/amd64 system compiler Thread model: posix gcc version 3.4.6 [FreeBSD] 20060825 [EMAIL PROTECTED]/tmp : cc -O0 test_float128.c /var/tmp//cc9c9baG.o(.text+0x38): In function `main': : undefined reference to `__extendxftf2' /var/tmp//cc9c9baG.o(.text+0x5e): In function `main': : undefined reference to `__trunctfxf2' Thanks. HG, Lee. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGKQ+01D7/GiH6QSERCpwuAKDCK7R7Epl/tp+croit8pCOc3BRIQCgwQYm 6Znx4dXOuhZjaXrcE7ywWg8= =V49A -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Linking error with __float128 conversions
On Apr 20, 2007, at 12:08 PM, Hyo geol, Lee wrote: I had problem in linking error with __float128 conversion functions. I am using FreeBSD/amd64 -current and test code is below. [ ... ] When I build above code, I got linking error. Is this just unsupported functions or something missing in header or linking options? Error message is below. I don't see any reference to float128 in the BSD header files, so it is probably unsupported. It might be the case that you can use long double or perhaps the Apache Harmony header files here: http://harmony.apache.org/subcomponents/drlvm/doxygen/vmcore/html/ structFLOAT128.html ...to build your own float128 struct. The GNU MP library might also be useful. -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
gmake in jail from ports linking to ld-linux.so.2 ??? Re: building jdk15 in a jail -- __mb_cur_max Undefined Symbol
On Mar 3, 2007, at 5:18 PM, Bill Moran wrote: On Mar 3, 2007, at 4:01 PM, Chad Leigh -- Shire.Net LLC wrote: Hi I am trying to build jdk15 inside my jail with PREFIX set to /usr/ public (At one time I successfully got jdk 1.4 to build after much hacking) I have the option for builing inside a jail set. We get to the point where the linux java is installed and it is actually building the jdk # Start of jdk build /libexec/ld-elf.so.1: /usr/local/lib/libiconv.so.3: Undefined symbol __mb_cur_max *** Error code 1 Stop in /usr/ports/java/jdk15. # I am not exactly sure what it is doing at this point in order to hack round it.libiconv a fresh install from ports Turns out that the issue is that gmake cannot run. I have not figured out why yet, having removed and reinstalled libiconv and gmake and getting the same error. But it is not java related. I'll redirect this to -questions If anyone has an idea on why gmake would fail as above on a fresh install, 6.2-RELEASE from a day or two ago, I would appreciate it. Please CC me as I am not currently subscribed to -questions, though I am on -java Not a direct answer to your question, but when I needed to do this a few months ago, I just did a make package on my workstation, then shipped the package up to the jail system and installed it with pkg_add. Doesn't solve the problem, but if you're in a pinch, it's a handy workaround. Bill -- Thanks! That is an idea too. Maybe I will do that. - However, I want to figure why gmake is not working in the jail when I install from ports. Using the same directory tree on the base machine it works, but not in the jail. gmake gives the error /libexec/ld-elf.so.1: /usr/local/lib/libiconv.so.3: Undefined symbol __mb_cur_max when built and run inside the jail but not when built and run pn the base machine. doing an ldd on the base machine shows # ldd /usr/local/bin/gmake /usr/local/bin/gmake: libintl.so.6 = /usr/local/lib/libintl.so.6 (0x8809b000) libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x880a4000) libc.so.6 = /lib/libc.so.6 (0x88191000) # but in the jail it shows # ldd /usr/public/bin/gmake /usr/public/bin/gmake: libintl.so.6 = /usr/local/lib/libintl.so.6 (0x8809b000) libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x880a4000) libc.so.6 = /usr/local/lib/libc.so.6 (0x88191000) ld-linux.so.2 (0x882ae000) # and I can't see why this would be the case. Both are building from the same port, same os, everything (indeed same machine) Any ideas appreciated! I am trying things and googling as well etc but I appreciate insight others may have on this. Has been stumping me for several hours today already :-( Please CC on any responses for now. I am resubscribing to -questions but don't know how long it will take to come back at me thanks Chad --- Chad Leigh -- Shire.Net LLC Your Web App and Email hosting provider chad at shire.net ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
gmake in jail from ports linking to ld-linux.so.2 ??? Re: building jdk15 in a jail -- __mb_cur_max Undefined Symbol
On Mar 3, 2007, at 5:18 PM, Bill Moran wrote: On Mar 3, 2007, at 4:01 PM, Chad Leigh -- Shire.Net LLC wrote: Hi I am trying to build jdk15 inside my jail with PREFIX set to /usr/ public (At one time I successfully got jdk 1.4 to build after much hacking) I have the option for builing inside a jail set. We get to the point where the linux java is installed and it is actually building the jdk # Start of jdk build /libexec/ld-elf.so.1: /usr/local/lib/libiconv.so.3: Undefined symbol __mb_cur_max *** Error code 1 Stop in /usr/ports/java/jdk15. # I am not exactly sure what it is doing at this point in order to hack round it.libiconv a fresh install from ports Turns out that the issue is that gmake cannot run. I have not figured out why yet, having removed and reinstalled libiconv and gmake and getting the same error. But it is not java related. I'll redirect this to -questions If anyone has an idea on why gmake would fail as above on a fresh install, 6.2-RELEASE from a day or two ago, I would appreciate it. Please CC me as I am not currently subscribed to -questions, though I am on -java Not a direct answer to your question, but when I needed to do this a few months ago, I just did a make package on my workstation, then shipped the package up to the jail system and installed it with pkg_add. Doesn't solve the problem, but if you're in a pinch, it's a handy workaround. Bill -- Thanks! That is an idea too. Maybe I will do that. - However, I want to figure why gmake is not working in the jail when I install from ports. Using the same directory tree on the base machine it works, but not in the jail doing an ldd on the base machine shows # ldd /usr/local/bin/gmake /usr/local/bin/gmake: libintl.so.6 = /usr/local/lib/libintl.so.6 (0x8809b000) libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x880a4000) libc.so.6 = /lib/libc.so.6 (0x88191000) # but in the jail it shows # ldd /usr/public/bin/gmake /usr/public/bin/gmake: libintl.so.6 = /usr/local/lib/libintl.so.6 (0x8809b000) libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x880a4000) libc.so.6 = /usr/local/lib/libc.so.6 (0x88191000) ld-linux.so.2 (0x882ae000) # and I can't see why this would be the case. Both are building from the same port, same os, everything (indeed same machine) Any ideas appreciated! I am trying things and googling as well etc but I appreciate insight others may have on this. Has been stumping me for several hours today already :-( Please CC on any responses for now. I am resubscribing to -questions but don't know how long it will take to come back at me thanks Chad --- Chad Leigh -- Shire.Net LLC Your Web App and Email hosting provider chad at shire.net ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: port building linking
Andrew Pantyukhin wrote: On 4/21/06, ph rhole oper [EMAIL PROTECTED] wrote: I need to build a port (mail/cyrus-imapd23) and add support for the mit-kerberos implementation to it. It needs to link to the -lkrb5 library.There are two libkrb5*.so in my system: the heimdal one (/usr/lib/libkrb5*.so) and the mit one (/usr/local/lib/libkrb5*.so). The configure script, searching for -lkrb5, finds /usr/lib/libkrb5.so first, and links to the heimdal implementation. Is there any way i can force it to only link against /usr/local/lib/libkrb5.so?I need the mit implementation. simon. -- http://www.fastmail.fm - Access your email from home and the web ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Are you talking about cyrus-imapd or cyrus-sasl? cyrus-sasl has some options in its Makefile, like KRB5_HOME. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] speaking of cyrus, i've recently spotted new entry in my passwd and have been wondering where/when did it get there.. ?? of course i don't know of installing anything called cyrus.. m. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: port building linking
speaking of cyrus, i've recently spotted new entry in my passwd and have been wondering where/when did it get there.. ?? of course i don't know of installing anything called cyrus.. If you have installed CMU sasl, that does add cyrus user as well. -Reko ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: port building linking
Reko Turja wrote: speaking of cyrus, i've recently spotted new entry in my passwd and have been wondering where/when did it get there.. ?? of course i don't know of installing anything called cyrus.. If you have installed CMU sasl, that does add cyrus user as well. -Reko i'm not aware of it. it might have been installed as a dependency, though, i guess. cheers, m. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: port building linking
martinko wrote: Reko Turja wrote: speaking of cyrus, i've recently spotted new entry in my passwd and have been wondering where/when did it get there.. ?? of course i don't know of installing anything called cyrus.. If you have installed CMU sasl, that does add cyrus user as well. -Reko i'm not aware of it. it might have been installed as a dependency, though, i guess. cheers, m. aahh.. mail-notification is the culprit ;-) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: port building linking
On 4/21/06, ph rhole oper [EMAIL PROTECTED] wrote: I need to build a port (mail/cyrus-imapd23) and add support for the mit-kerberos implementation to it. It needs to link to the -lkrb5 library.There are two libkrb5*.so in my system: the heimdal one (/usr/lib/libkrb5*.so) and the mit one (/usr/local/lib/libkrb5*.so). The configure script, searching for -lkrb5, finds /usr/lib/libkrb5.so first, and links to the heimdal implementation. Is there any way i can force it to only link against /usr/local/lib/libkrb5.so?I need the mit implementation. simon. -- http://www.fastmail.fm - Access your email from home and the web ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Are you talking about cyrus-imapd or cyrus-sasl? cyrus-sasl has some options in its Makefile, like KRB5_HOME. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: port building linking
On Sat, 22 Apr 2006 20:26:28 +0400, Andrew Pantyukhin [EMAIL PROTECTED] said: On 4/21/06, ph rhole oper [EMAIL PROTECTED] wrote: I need to build a port (mail/cyrus-imapd23) and add support for the mit-kerberos implementation to it. It needs to link to the -lkrb5 library.There are two libkrb5*.so in my system: the heimdal one (/usr/lib/libkrb5*.so) and the mit one (/usr/local/lib/libkrb5*.so). The configure script, searching for -lkrb5, finds /usr/lib/libkrb5.so first, and links to the heimdal implementation. Is there any way i can force it to only link against /usr/local/lib/libkrb5.so?I need the mit implementation. simon. -- http://www.fastmail.fm - Access your email from home and the web ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Are you talking about cyrus-imapd or cyrus-sasl? cyrus-sasl cyrus-imapd23 has some options in its Makefile, like KRB5_HOME. interesting option but i didnt see anything like this for cyrus-imapd.I solved the problem with a rather drastic way though: cd /usr/lib for i in *krb5* *com_err* *gss*;do mv -v $i heimdal.$i;done ldconfig -R export LDFLAGS=-L/usr/local/lib -lkrb5 -lkrb5support -lcom_err -lgssapi cd /usr/ports/cyrus-imapd23/ make install just temporarily to force it use the /usr/local/lib/* libraries. simon. -- http://www.fastmail.fm - Accessible with your email software or over the web ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
port building linking
I need to build a port (mail/cyrus-imapd23) and add support for the mit-kerberos implementation to it. It needs to link to the -lkrb5 library.There are two libkrb5*.so in my system: the heimdal one (/usr/lib/libkrb5*.so) and the mit one (/usr/local/lib/libkrb5*.so). The configure script, searching for -lkrb5, finds /usr/lib/libkrb5.so first, and links to the heimdal implementation. Is there any way i can force it to only link against /usr/local/lib/libkrb5.so?I need the mit implementation. simon. -- http://www.fastmail.fm - Access your email from home and the web ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Linking standalone NASM binary with libc
On Tue, Aug 30, 2005 at 02:11:09PM +0300, Giorgos Keramidas wrote: : I'm sure others can think of more points in support or linking to libc : and against linking to it :-) Most of what I want to do is low-level encryption... like copy protection routines. I love those. So who needs libc for that? ;-) Jonathon McKitrick -- Hoppiness is a good beer. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Linking standalone NASM binary with libc
On 2005-08-30 04:29, Jonathon McKitrick [EMAIL PROTECTED] wrote: I'm doing some experimentation with assembly code based on the int80h.org tutorials. But since I am going to use malloc and some other functions, I need to make my code link with libc rather than stand totally on its own. ld -s -o foo foo.o -lc leaves 'environ' and '__progname' undefined. What is the correct way to link standalone asm code with needed libraries? That depends on what the ``standalone'' code contains. If your foo.o object file defines a 'main' function, then you can just use cc(1): % tesla:/tmp/foo$ cat -n foo.asm % 1 global main % 2 main: % 3 mov eax,1 ; exit() syscall % 4 mov ebx,1 ; exit code % 5 int 0x80; trap into kernel % tesla:/tmp/foo$ nasm -f elf -o foo.o foo.asm == % tesla:/tmp/foo$ cc -o foo foo.o % tesla:/tmp/foo$ ./foo % tesla:/tmp/foo$ echo $? % 1 % tesla:/tmp/foo$ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Linking standalone NASM binary with libc
On Tue, Aug 30, 2005 at 01:37:02PM +0300, Giorgos Keramidas wrote: : On 2005-08-30 04:29, Jonathon McKitrick [EMAIL PROTECTED] wrote: : : I'm doing some experimentation with assembly code based on the int80h.org : tutorials. But since I am going to use malloc and some other functions, : I need to make my code link with libc rather than stand totally on its own. : : ld -s -o foo foo.o -lc : : leaves 'environ' and '__progname' undefined. What is the correct way to link : standalone asm code with needed libraries? : : That depends on what the ``standalone'' code contains. If your foo.o : object file defines a 'main' function, then you can just use cc(1): This is the method I've been using until now. And maybe it's the best one. I was just wondering, though, if I want to write an app that is linked to libc, but doesn't have 'main', and has '_start' instead, and where I want to use ld directly rather than indirectly through cc to link. Jonathon McKitrick -- Hoppiness is a good beer. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Linking standalone NASM binary with libc
On 2005-08-30 11:43, Jonathon McKitrick [EMAIL PROTECTED] wrote: On Tue, Aug 30, 2005 at 01:37:02PM +0300, Giorgos Keramidas wrote: On 2005-08-30 04:29, Jonathon McKitrick [EMAIL PROTECTED] wrote: I'm doing some experimentation with assembly code based on the int80h.org tutorials. But since I am going to use malloc and some other functions, I need to make my code link with libc rather than stand totally on its own. ld -s -o foo foo.o -lc leaves 'environ' and '__progname' undefined. What is the correct way to link standalone asm code with needed libraries? That depends on what the ``standalone'' code contains. If your foo.o object file defines a 'main' function, then you can just use cc(1): This is the method I've been using until now. And maybe it's the best one. I was just wondering, though, if I want to write an app that is linked to libc, but doesn't have 'main', and has '_start' instead, and where I want to use ld directly rather than indirectly through cc to link. That's up to you, really. Linking to the libc library has both good and bad points. 1) Good - You don't need to reinvent the wheel as far as program startup, cleanup and other useful bits are concerned. - Since the C library has setup up things for you, you can call all the known functions that libc or other libraries that use the same calling conventions support (i.e. any library available on your FreeBSD system). 2) Bad - The extra bloat of the C startup/cleanup code. - When you call into C functions you should follow the C calling conventions, otherwise the called library functions may break in bad ways. I'm sure others can think of more points in support or linking to libc and against linking to it :-) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Linking standalone NASM binary with libc
Hi all, I'm doing some experimentation with assembly code based on the int80h.org tutorials. But since I am going to use malloc and some other functions, I need to make my code link with libc rather than stand totally on its own. ld -s -o foo foo.o -lc leaves 'environ' and '__progname' undefined. What is the correct way to link standalone asm code with needed libraries? jm -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Linking to the html docs on a system?
What's the best/easiest way to make all the html documentation on a FreeBSD server available from the DocRoot directory of an http server? (boa on 5.4) A 'one liner' would be great. -- John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
linking with linux shared library
Hallo everybody, 1:) Suppose I have a Linux Library library.so. And I want to link it with my main.c compiled in FreeBSD. How can I achieve that? Thanks in advance! Simeon! __ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: linking with linux shared library
On Fri, May 27, 2005 at 03:10:13PM -0700, Simeon Nifos wrote: Hallo everybody, 1:) Suppose I have a Linux Library library.so. And I want to link it with my main.c compiled in FreeBSD. How can I achieve that? You can't. You may not need to though. What are you really trying to achieve? :) Kris pgpTtHzNGdKwS.pgp Description: PGP signature
Problem linking MySQL 4.1.11 via FreeBSD 4.10 ports
I am having a problem building from ports, which is a fairly rare experience for me. When I try to make the current port of the MySQL 4.1 server under FreeBSD 4.10, I get a huge stream of undefined reference errors at the link step for mysqld. It would seem it can't find any thread-related library references, e.g. `mutex_enter_func', regardless of which thread library I request. I started out trying to build with the default pthreads library, then switched to the Linuxthreads library as it's supposed to have better performance under 4.x anyway. I've checked my environment for a messed up LD_CONFIG_PATH, have rerun ldconfig (numerous times) and have checked the threads libraries created using ldd. I can see the lthread library being referenced on the command line. Factoids: * Running FreeBSD 4.10 on a development-only server (thank goodness.) * The ports tree was CVSupped late last week (4/14/2005) * Trying to build MySQL version 4.1.11 from /usr/ports/databases/mysql41-server/ * linuxthreads-2.2.3_16 built and installed yesterday, did not resolve the problem * Problem seen (with different variable names) both with and without the WITH_LINUXTHREADS=yes parameter to make. * gcc 2.95.4 (system version), libtool-1.5.10_1 (from ports) * I've built about 10 other packages from ports into binary packages in the last few days, with no similar problems. * I've tried switching to a regular root shell via su, to make sure it's not a sudo environment problem, even though my other port makes work from sudo. * I've repeatedly done a make clean to make sure that I don't have configuration cruft. $ cc -v Using builtin specs. gcc version 2.95.4 20020320 [FreeBSD] $ head -4 /var/run/dmesg.boot | tail -1 FreeBSD 4.10-RELEASE #0: Tue Jun 22 17:01:51 HST 2004 $ head Makefile # New ports collection makefile for:MySQL-server # Date created: Fri Apr 11 10:06:26 CET 2003 # Whom: Alex Dupre [EMAIL PROTECTED] # # $FreeBSD: ports/databases/mysql41-server/Makefile,v 1.206 2005/04/12 03:25:02 obrien Exp $ # PORTNAME?= mysql PORTVERSION=4.1.11 PORTREVISION?= 1 $ sudo make FORCE_PKG_REGISTER=yes WITH_LINUXTHREADS=yes ... Making all in share /usr/local/bin/libtool15 --preserve-dup-deps --mode=link cc -DDBUG_OFF -DNEWSA LT -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include/pthread/linu xthreads -DNEWSALT -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE -I/usr/local/incl ude/pthread/linuxthreads -felide-constructors -fno-rtti -fno-exceptions -fno-i mplicit-templates -fno-exceptions -fno-rtti -DMYSQLD_NET_RETRY_COUNT=100 -o mysqld sql_lex.o sql_handler.o item.o item_sum.o item_buff.o item_func.o i tem_cmpfunc.o item_strfunc.o item_timefunc.o thr_malloc.o item_create.o item_ subselect.o item_row.o item_geofunc.o field.o strfunc.o key.o sql_class.o sql_ list.o net_serv.o protocol.o sql_state.o lock.o my_lock.o sql_string.o sql_ma nager.o sql_map.o mysqld.o password.o hash_filo.o hostname.o set_var.o sql_par se.o sql_yacc.o sql_base.o table.o sql_select.o sql_insert.o sql_prepare.o sql _error.o sql_update.o sql_delete.o uniques.o sql_do.o procedure.o item_uniq.o sql_test.o log.o log_event.o init.o derror.o sql_acl.o unireg.o des_key_file. o discover.o time.o opt_range.o opt_sum.o records.o filesort.o handler.o ha_h eap.o ha_myisam.o ha_myisammrg.o ha_berkeley.o ha_innodb.o ha_isam.o ha_isammr g.o ha_ndbcluster.o sql_db.o sql_table.o sql_rename.o sql_crypt.o sql_load.o m f_iocache.o field_conv.o sql_show.o sql_udf.o sql_analyse.o sql_cache.o slave. o sql_repl.o sql_union.o sql_derived.o client.o sql_client.o mini_client_error s.o pack.o stacktrace.o repl_failsafe.o gstream.o spatial.o sql_help.o protoc ol_cursor.o tztime.o my_time.o ha_example.o ha_archive.o ha_tina.o ha_blackhol e.o -L../bdb/build_unix -ldb ../innobase/usr/libusr.a ../innobase/srv/libsrv.a ../innobase/dict/libdict.a ../innobase/que/libque.a ../innobase/srv/libsrv.a ../ innobase/ibuf/libibuf.a ../innobase/row/librow.a ../innobase/pars/libpars.a ../i nnobase/btr/libbtr.a ../innobase/trx/libtrx.a ../innobase/read/libread.a ../inno base/usr/libusr.a ../innobase/buf/libbuf.a ../innobase/ibuf/libibuf.a ../innobas e/eval/libeval.a ../innobase/log/liblog.a ../innobase/fsp/libfsp.a ../innobase/f ut/libfut.a ../innobase/fil/libfil.a ../innobase/lock/liblock.a ../innobase/mtr/ libmtr.a ../innobase/page/libpage.a ../innobase/rem/librem.a ../innobase/thr/lib thr.a ../innobase/sync/libsync.a ../innobase/data/libdata.a ../innobase/mach/lib mach.a ../innobase/ha/libha.a ../innobase/dyn/libdyn.a ../innobase/mem/libmem.a ../innobase/sync/libsync.a ../innobase/ut/libut.a ../innobase/os/libos.a ../inno base/ut/libut.a ../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/ libheap.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/lib regex.a ../strings/libmystrings.a -lz -lwrap
Re: Problem linking MySQL 4.1.11 via FreeBSD 4.10 ports
On Tue, Apr 19, 2005 at 02:02:39PM -1000, Clifton Royston wrote: When I try to make the current port of the MySQL 4.1 server under FreeBSD 4.10, I get a huge stream of undefined reference errors at the link step for mysqld. More factoids - the same error continues to happen: * After rebuilding libtool 1.5.10 to make sure it's OK, as suggested to me offlist. * After rebuilding the linuxthreads port to make sure the library is OK. * After trying the same with MySQL 4.0 (mysql40-server) to make sure it's not a ports problem specific to 4.1. I started doing a bunch of find ... | xargs grep 'mutex_enter_func' and the like for the undefined symbols, and it appears that at least some of the problematic functions I'm looking at are defined internal to MySQL's libraries, and are intended to be inlined. However clearly they can't be succeeding, or they wouldn't be showing up as external references to the link phase. The function mutex_enter_func and some similar ones, for instance, are defined in files with a .ic extension - C files with heavy inlining of assembler - and they are defined with type UNIV_INLINE. In innobase/include/univ.i this shows up thus: #if (!defined(UNIV_DEBUG) !defined(INSIDE_HA_INNOBASE_CC) !defined(UNIV_MUST_NOT_INLINE)) /* Definition for inline version */ #ifdef __WIN__ #define UNIV_INLINE __inline #else /* config.h contains the right def for 'inline' for the current compiler */ #if (__GNUC__ == 2) #define UNIV_INLINE extern inline #else /* extern inline doesn't work with gcc 3.0.2 */ #define UNIV_INLINE static inline #endif #endif #else /* If we want to compile a noninlined version we use the following macro definitions: */ #define UNIV_NONINL #define UNIV_INLINE #endif /* UNIV_DEBUG */ ... so I can see that gcc 2.95 and gcc 3.3 would be handled quite differently by these conditional defines. I am starting to think this might be a toolchain issue, where the ports have gotten out of sync with what the default build environment is for 4.1. Can anyone please verify for me that the mysql40-server and/or mysql41-server ports actually *do* build under gcc 2.95.4 as installed on a fresh-out-of-box 4.x system? I'd really rather not have to upgrade the compiler toolchain just to build this port. -- Clifton -- Clifton Royston -- [EMAIL PROTECTED] Tiki Technologies Lead Programmer/Software Architect I'm gonna tell my son to grow up pretty as the grass is green And whip-smart as the English Channel's wide... -- 'Whip-Smart', Liz Phair ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Problem linking MySQL 4.1.11 via FreeBSD 4.10 ports
On Tue, Apr 19, 2005 at 05:22:29PM -1000, Clifton Royston wrote: ... so I can see that gcc 2.95 and gcc 3.3 would be handled quite differently by these conditional defines. I am starting to think this might be a toolchain issue, where the ports have gotten out of sync with what the default build environment is for 4.1. Can anyone please verify for me that the mysql40-server and/or mysql41-server ports actually *do* build under gcc 2.95.4 as installed on a fresh-out-of-box 4.x system? I'd really rather not have to upgrade the compiler toolchain just to build this port. ... Oops, I hate to follow up to myself, but there were a couple rather confusing typos and wording problems in the last few paragraphs. What I meant to say first, is that it seems to me this might be a toolchain problem, in that the ports may not be specifying the *extra* build requirements needed to build them starting from the default build environment for FreeBSD 4.x? ( Not for 4.1!) And last, I meant to say I'd rather not upgrade the compiler unless *necessary* to get MySQL running - I will if I have to. I have seen a number of people post about running MySQL on FreeBSD, though, and I haven't seen any mention that it's now necessary to upgrade GCC first, so I am still puzzled why I seem to be the only one running into this. -- Clifton -- Clifton Royston -- [EMAIL PROTECTED] Tiki Technologies Lead Programmer/Software Architect I'm gonna tell my son to grow up pretty as the grass is green And whip-smart as the English Channel's wide... -- 'Whip-Smart', Liz Phair ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Binary linking/updating libraries
How do I relink a binary against a library after I have updated the lib? For example I updated glib and now xchat complains about the library not being installed as it was linked against the old version. Is there any utility that can see which executables have library problems and relink them accordingly? Thanks in advance, - j ._ | Justin R. Pessa | http://jstn.sdf1.org pgpgs0VzRS33k.pgp Description: PGP signature