From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WF7eKVfqW2OjLAEAbAwnHQ (envelope-from ) for ; Fri, 28 Oct 2022 16:42:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aGSlKVfqW2N1IAAAauVa8A (envelope-from ) for ; Fri, 28 Oct 2022 16:42:31 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 630798AE0 for ; Fri, 28 Oct 2022 16:42:31 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooQYc-0005ZG-S8; Fri, 28 Oct 2022 10:42:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooQYT-0005Ye-Pt for help-guix@gnu.org; Fri, 28 Oct 2022 10:41:53 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ooQYS-0000JF-79 for help-guix@gnu.org; Fri, 28 Oct 2022 10:41:53 -0400 Received: by mail-wr1-x435.google.com with SMTP id a14so6881373wru.5 for ; Fri, 28 Oct 2022 07:41:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :from:to:cc:subject:date:message-id:reply-to; bh=yaEVfrau7XUyOSoGoWXArlHbbnglVdss8dQUdk1LfIc=; b=SGnxFxlQerY4m86kzyX/nvPSFYs48OZ6Sxs867fgwpl9AvPPRPcg2J/XsgAzTD4uYx yp/aEpAldDQ6Qv6+gCgQuWB4UJibhQs5b+okJLuXvtrCpWqanF/Tlni8eOt77Y6ZlMzk m7ePRhRhVEAJ/BwwZFAsXmp+Fcl3I4t/KCXHZCs62y22dOj33kYeX4GITWTv0j2N1Xsa J3LjT9VNoHsl6ymwit1jd58EAko9W7L2XJQO5oVP8usCSxB92uJA8WoqY3l0tuXnSTSv v45gPUvVO9UGM5NSD2wu9QMm8sO5A63NfBZEXa7/YGDjWJFoIfBh4wf9Fo2wmfAPrCga wFkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yaEVfrau7XUyOSoGoWXArlHbbnglVdss8dQUdk1LfIc=; b=Bzqik+tNbnikUp5apDQlw1du9x3yrdAR8vWUxIfIBevQvMmw3uw9O09ZgEmR2KaXH5 yxOe39adgZ9ZB/NfxJU5Clru3U+FYQoRLEmXZALCfK5Z2CErbjhSQbVQNLIWYPD9D2/K kGuTFM7tto9fVDYKLkficYvp6kzvtXGVf7H6CHkj5cgygZTPSOpl1x4FWypUXK+EFO6i 0nRQgKUeUx5cO5YGNHbWnnr5JWfFPyGHm+x7lUKOhtCX0CTdyGrsGUAYnpT8jxVoxsqw 2U+8EMkR8NkkD4WBZSJr1g3ECXRCBHXuSQPjmMWX4eHChQXC8wgPFkyseCkS7kkYaEjg AzsA== X-Gm-Message-State: ACrzQf3p7SkzKatxzVeZUgsihP4PBtr91XPi0dX3R2sUkxq9FjU5dwaw DqSinHCAt7cmFBixZg/g7fOOBeFpG10= X-Google-Smtp-Source: AMsMyM7f3VzrWvXMwSTdJsdsb5olNlC/eGf7sxbqXzAdW8vCKmUXvO4DT6SMhivodBp8GUKM8A5FFw== X-Received: by 2002:adf:fe85:0:b0:236:7cde:a95d with SMTP id l5-20020adffe85000000b002367cdea95dmr13609582wrr.531.1666968110141; Fri, 28 Oct 2022 07:41:50 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id iw7-20020a05600c54c700b003c6bbe910fdsm9153624wmb.9.2022.10.28.07.41.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 07:41:49 -0700 (PDT) From: zimoun To: Milind Kamble , help-guix@gnu.org Subject: Re: microscheme fails to assemble BLINK.ms due to avr-gcc search path issue In-Reply-To: References: Date: Fri, 28 Oct 2022 16:29:56 +0200 Message-ID: <871qqshvh7.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Help-Guix" Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666968151; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=yaEVfrau7XUyOSoGoWXArlHbbnglVdss8dQUdk1LfIc=; b=r141Qxwb/ItAfmrBnDY4qAb4eImh4doztB0vthfKZTX3mvrcnRZ3u+kF8oz2Q7FA4075kd erovPaohDoIyXeeoSEcT9H2+Ts3Cw2gZ7RM5vpuJsUt5x7AFLCLi9MldpaaICX+fB5G3dG uHKWjY17Dw9XOcKLYNDI8WIg726DoNSu3wD1PwEPRp6P4Py/B4MiQJLO30kRyh6hxoUQj2 0tero5ONiDC2/+AUn2st4JmzWXm6U4eyA6mYQ+5/K4hnX8cmsnrp+dSLEAFntqji6iva1v vKu1EjrXy902HGIAclMzh9NSo/vWhp2mqfI2YSR6QgGpf/Y7dx+p3ZJ92lsfHQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666968151; a=rsa-sha256; cv=none; b=oPu8kuVI3C6Ds12A9mH0y7eXGyP0q8i4drT7ijLUH2WTFQtBg4rRZNzuc8GtyN0oZm08Uf b3Ge14/q4gvQqqShhNRjSqAkKA1VsiUNPIcIOof4QCWNJ05Kf/g2GnmljRwBPKcdCqw7lZ WuZd5WDcOqZ3pfZpXiizBf9SEvyFMLb8ji4e4JgQr3aEnHrlxVixE2g19kSBp7TH1a+I5V JROzM8Y0/lkauOQ5xLWATUV+Kfv8psPaCRDooVxRIfzQlyzdlTqmE9j+VyuABkjV7HPbf3 OBj15+0sGG5sqIKmCxNkHe3GQtOv5Mp45WblFF6T/er/TUyyzLh41t7Ajccjaw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=SGnxFxlQ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.92 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=SGnxFxlQ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 630798AE0 X-Spam-Score: -3.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: jaxVFUP2ZS0z Hi, Sorry for the late reply. On sam., 24 sept. 2022 at 18:53, Milind Kamble wrote: > ~/tmp> microscheme -v -m UNO -d /dev/ttyACM0 -a ./BLINK.ms > Microscheme 0.9.3, (C) Ryan Suchocki >>> './BLINK.ms' found. >>> Treeshaker: After 4 rounds: 89 globals purged! 22 bytes will be reserved. >>> Remaining globals: [forever arduino-ports arduino-pins set-ddr set-pin high? output low? toggle led-pin loop ] >>> 21 lines compiled OK >>> Assembling... > avr-ld: cannot find crtatmega328p.o: No such file or directory > avr-ld: cannot find -lm > avr-ld: cannot find -lc > avr-ld: cannot find -latmega328p > collect2: error: ld returned 1 exit status >>> Warning: Command may have failed. (Exit code 256) > avr-objcopy: 'BLINK.elf': No such file >>> Warning: Command may have failed. (Exit code 256) >>> Finished. > > To debug the issue, I cloned the microscheme from github and built the > tool . Running that version also gave the exact same error. So after > combing for hints online, I realized that perhaps the "-B" flag needs > to be provided in the avr-gcc command launched by microscheme. And > that worked. > So the hack needed to make it work was > avr-gcc -mmcu=atmega328p -B ~/.guix-profile/avr/lib/avr5 -o BLINK.elf BLINK.s > > > ~/.guix-profile/avr/lib/avr5 is a link to > /gnu/store/r7kn43jwf4qj9lagj0pr4irzrwbvls0b-avr-libc-2.0.0/avr/lib/avr5 > -- the key point being it points to a subdirectory of avr-libc > But the default search path of avr-gcc does not include avr-libc in > the store. Hence the -B hack works. > > The question is why do we need to specify -B explicitly. avr-libs > should be included in the search path for avr-gcc. > What am I missing? Just a naive question because I know nothing about this topic, does it work if more than lib/avr5 (e.g., avr25, avr, avr31, etc.) is provided in the search path? Cheers, simon