From owner-freebsd-questions@FreeBSD.ORG Mon Sep 15 18:11:43 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82169874 for ; Mon, 15 Sep 2014 18:11:43 +0000 (UTC) Received: from rc2.surewest.net (rc2.surewest.net [66.60.130.51]) by mx1.freebsd.org (Postfix) with ESMTP id 668EFA6F for ; Mon, 15 Sep 2014 18:11:43 +0000 (UTC) Received: from smtp3.surewest.net ([66.60.130.145]) by rc2.surewest.net ({af05c03d-e86d-4922-90cb-b2bd72ac7e37}) via TCP (outbound) with ESMTP id 20140915180821397 for ; Mon, 15 Sep 2014 18:08:21 +0000 X-RC-FROM: X-RC-RCPT: Received: from webmail.mycci.net (webmail.mycci.net [66.60.130.47]) by smtp3.surewest.net (Postfix) with ESMTP id 7C7D5896F5 for ; Mon, 15 Sep 2014 11:08:20 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 15 Sep 2014 11:08:19 -0700 From: leeoliveshackelford@surewest.net To: Freebsd questions Subject: Please help with bash, clang, and gdb Message-ID: <0a25d1f33a72a97d809538c6d23ee07b@surewest.net> X-Sender: leeoliveshackelford@surewest.net User-Agent: Consolidated Webmail/0.9.5 X-MAG-OUTBOUND: surewest.redcondor.net@66.60.130.145/32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2014 18:11:43 -0000 Greetings dear FreeBSD enthusiast. I have written a character mode c-language program that is supposed to read data from a text file on a floppy disk, perform calculations on that data, then write the result to another text file on the same floppy disk. The operating system is FreeBSD 9.1. The computer is a Hewlett-Packard xw4400 workstation equipped with a Pentium D microprocessor. The D processor has only a single core. I insert the floppy disk, then type as follows: mount -t msdosfs -w /dev/fd0 /mnt clang -x c -g /mnt/ProgName.c > mnt/CompOut.txt 2>&1 I do not understand the syntax of the last four characters of the second line, but they somehow cause bash to redirect the output of clang orginially directed to the monitor screen to the specified file. The output file from clang is generated. It contains one warning, and no errors. If I then type at the prompt /root/a.out /mnt/BmIn0001.txt the a.out program prints to the monitor screen instructions to the user, which are followed immediatedly by the prompt symbol. The source-code line to open the input file is as follows: if ((InpFileHand = fopen (argv[1], "rb"))==NULL) { printf ("nCould not open file %s.", argv [1]); exit (11); } The source-code line to open the output file is as follows: if ((OutpFileHand = fopen (OutpFileName, "wt")) == NULL) { printf ("nCould not open file %s", OutpFileName); fcloseall(); exit (25); } where OutpFileName is an array of char read from the input file. If I enter the following wait $! echo $? the exit code of 0 is displayed. An exit code of 0 is generated by the last line of the program. If the program failed to open either file, an error code of either 11 or 25 should have been produced. Even though the a.out program exitted normally as far as the operating system is concerned, the indicator on the floppy drive never lights, causing me to believe that the program failed to read the input file. When I enter cd /mnt ls the expected output file is shown to be absent. How did my program get all of the way from beginning to end without opening the files, yet not exit with expected codes of 11 or 25? Attempting to answer this question, I then enter at the prompt gdb /root/a.out then, at the gdb prompt, enter set args /mnt/BmIn0001.txt gdb fails with an error code of 0177. I research this error code with the aid of Google, and am informed that it indicates that, under p-threads, the libraries were loaded in an incorrect order. My program is intended to be a c language, not c++ language program, with all libraries loaded with the executable and linked statically. The only libraries referenced in the program are stdio, stdlib, math, and time. The only library functions called are printf(), fprintf(), fopen(), fcloseall(), fgetc(), ungetc(), fwrite(), sqrtr(), time(), and ctime(). What do any of these have to do with p-threads? I realize that this is a long message, and that programmers may have more important responsibilities than helping newbies. Is there a FreeBSD developer who is familiar with these three programs who might be willing to identify my error(s)? Any and all suggestions are appreciated. Sincerely, Newby Lee From owner-freebsd-questions@FreeBSD.ORG Mon Sep 15 18:13:52 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E15AC35 for ; Mon, 15 Sep 2014 18:13:52 +0000 (UTC) Received: from COL004-OMC4S6.hotmail.com (col004-omc4s6.hotmail.com [65.55.34.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66FFDAA7 for ; Mon, 15 Sep 2014 18:13:52 +0000 (UTC) Received: from COL128-W17 ([65.55.34.199]) by COL004-OMC4S6.hotmail.com with Microsoft SMTPSVC(7.5.7601.22724); Mon, 15 Sep 2014 11:13:51 -0700 X-TMN: [rHPRoO8gYrhW0S8laa2JSSJDcal2Yn+9] X-Originating-Email: [jordantboland@live.com] Message-ID: From: Jordan Boland To: "freebsd-questions@freebsd.org" Subject: linux-crashplan (relies on forbidden port: linux-f10-expat) Date: Mon, 15 Sep 2014 11:13:51 -0700 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 15 Sep 2014 18:13:51.0381 (UTC) FILETIME=[CD767C50:01CFD110] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2014 18:13:52 -0000 Hi Everyone=2C I'd like to implement Crashplan=2C and was pleased to find some notes onlin= e from others who have it running using the Linux ABI. Crashplan requires = a Linux JRE=2C which in turn requires linux-f10-expat=2C which has been for= bidden (http://www.freshports.org/vuxml.php?vid=3D5f030587-e39a-11de-881e-0= 01aa0166822). Running `make -DNO_IGNORE` against linux-f10-expat fails with "error 1" - I= can't find any information on this error (I think the expectation is that = make will provide a message=2C but it doesn't). Do I have any options left? There might not be a lot of us looking at Cras= hplan in particular=2C but all of the linux-compatible JREs require the lin= ux-f10-expat port=2C so I thought there should be someone else talking abou= t it=2C but I seem to be mistaken about that. Thank you for your help=2C -Jordan =