From owner-freebsd-drivers@FreeBSD.ORG Mon Nov 3 19:15:20 2014 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDE80F79 for ; Mon, 3 Nov 2014 19:15:20 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CD14CB6 for ; Mon, 3 Nov 2014 19:15:20 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id sA3JFIV4090600 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 3 Nov 2014 11:15:18 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id sA3JFI5q090599; Mon, 3 Nov 2014 11:15:18 -0800 (PST) (envelope-from jmg) Date: Mon, 3 Nov 2014 11:15:18 -0800 From: John-Mark Gurney To: Nagesh Akula Subject: Re: ZLIB FreeBSD 9.1 version + deflateInit_ Symbol not found Message-ID: <20141103191517.GE8852@funkthat.com> Mail-Followup-To: Nagesh Akula , "freebsd-drivers@freebsd.org" References: <383FAC81A1B4D54E8BF7C31A699555FF11DE48DA@CMEXMB1.ad.emulex.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <383FAC81A1B4D54E8BF7C31A699555FF11DE48DA@CMEXMB1.ad.emulex.com> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Mon, 03 Nov 2014 11:15:18 -0800 (PST) Cc: "freebsd-drivers@freebsd.org" X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2014 19:15:21 -0000 Nagesh Akula wrote this message on Mon, Nov 03, 2014 at 06:28 +0000: > I am trying to add compression algorithm within the kernel module. > > For this, I have included library calls. > > With this getting an linker error, > in FreeBSD 9.1 OS version, getting kldload linker error on deflateInit_ symbol. > > link_elf_obj: symbol deflateInit_ undefined > linker_load_file: Unsupported file type > > But, in FreeBSD 10.0 version, the zlib library is able to link properly, and module is working fine. > > Please let me know, if there is any way to link ZLIB with our module in FreeBSD 9.1 ? This is probably because zlib is only compiled when using one of the following device/options in FreeBSD: crypto, geom_uzip, ipsec, mxge, netgraph_deflate, ddb_ctf, gzio, or geom_uncompress... Are you trying to compile you're code as a module or as a static part of the kernel? If you're doing it as a part of the kernel, then you need to update sys/conf/files to include your device/option on the line that has net/zlib.c on it... As for why it works on 10, but not 9, is that DDB_CTF was added to GENERIC, and DDB_CTF forces the inclusion of zlib... So, you could possibly load a module that uses zlib, or if that doesn't work, recomile your kernel to include such a device... Let me know if you have any more questions.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."