Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1048837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:31:15+00:00 2026-05-16T16:31:15+00:00

I’ve found that if you specify a path to Alchemy’s ‘ar’ tool, it won’t

  • 0

I’ve found that if you specify a path to Alchemy’s ‘ar’ tool, it won’t create the ‘l.bc’ file necessary to link the library.

For example, here is the case when I don’t specify a path (it works):

asimmons-mac:test asimmons$ echo 'int main() { return 42; }' > testmain.cpp
asimmons-mac:test asimmons$ echo 'int test1() { return -1; }' > test1.cpp
asimmons-mac:test asimmons$ echo 'int test2() { return 1; }' > test2.cpp
asimmons-mac:test asimmons$ g++ -c testmain.cpp
asimmons-mac:test asimmons$ g++ -c test1.cpp
asimmons-mac:test asimmons$ g++ -c test2.cpp
asimmons-mac:test asimmons$ ar cr libtest.a test1.o test2.o
asimmons-mac:test asimmons$ g++ testmain.cpp libtest.a
llvm-ld, "-o=".(98237.achacks.o = "98237.achacks.exe"), -disable-opt -internalize-public-api-list=_start,malloc,free,__adddi3,__anddi3,__ashldi3,__ashrdi3,__cmpdi2,__divdi3,__fixdfdi,__fixsfdi,__fixunsdfdi,__fixunssfdi,__floatdidf,__floatdisf,__floatunsdidf,__iordi3,__lshldi3,__lshrdi3,__moddi3,__muldi3,__negdi2,__one_cmpldi2,__qdivrem,__adddi3,__anddi3,__ashldi3,__ashrdi3,__cmpdi2,__divdi3,__qdivrem,__fixdfdi,__fixsfdi,__fixunsdfdi,__fixunssfdi,__floatdidf,__floatdisf,__floatunsdidf,__iordi3,__lshldi3,__lshrdi3,__moddi3,__muldi3,__negdi2,__one_cmpldi2,__subdi3,__ucmpdi2,__udivdi3,__umoddi3,__xordi3,__subdi3,__ucmpdi2,__udivdi3,__umoddi3,__xordi3,__error /Users/asimmons/Development/alchemy-darwin-v0.5a/avm2-libc/lib/avm2-libc.l.bc /Users/asimmons/Development/alchemy-darwin-v0.5a/avm2-libc/lib/avm2-libstdc++.l.bc, test.l.bc 98237.achacks.o

98237.achacks.swf, 5593510 bytes written
asimmons-mac:test asimmons$ ls -l
total 10992
-rwxr-xr-x  1 asimmons  staff  5593575 Apr  9 17:44 a.exe
-rw-------  1 asimmons  staff     1284 Apr  9 17:43 libtest.a
-rw-r--r--  1 asimmons  staff      672 Apr  9 17:43 test.l.bc
-rw-r--r--  1 asimmons  staff       27 Apr  9 17:43 test1.cpp
-rwxr-xr-x  1 asimmons  staff      536 Apr  9 17:43 test1.o
-rw-r--r--  1 asimmons  staff       26 Apr  9 17:43 test2.cpp
-rwxr-xr-x  1 asimmons  staff      536 Apr  9 17:43 test2.o
-rw-r--r--  1 asimmons  staff       26 Apr  9 17:43 testmain.cpp
-rwxr-xr-x  1 asimmons  staff      552 Apr  9 17:43 testmain.o
asimmons-mac:test asimmons$ 

And here is an example where I do specify a path (it doesn’t work). I try to tell ‘ar’ to put the library under ‘lib’ and then link to lib/libtest.a:

asimmons-mac:test asimmons$ mkdir lib
asimmons-mac:test asimmons$ echo 'int main() { return 42; }' > testmain.cpp
asimmons-mac:test asimmons$ echo 'int test1() { return -1; }' > test1.cpp
asimmons-mac:test asimmons$ echo 'int test2() { return 1; }' > test2.cpp
asimmons-mac:test asimmons$ g++ -c testmain.cpp
asimmons-mac:test asimmons$ g++ -c test1.cpp
asimmons-mac:test asimmons$ g++ -c test2.cpp
asimmons-mac:test asimmons$ ar cr lib/libtest.a test1.o test2.o
asimmons-mac:test asimmons$ g++ testmain.cpp lib/libtest.a
llvm-ld, "-o=".(98638.achacks.o = "98638.achacks.exe"), -disable-opt -internalize-public-api-list=_start,malloc,free,__adddi3,__anddi3,__ashldi3,__ashrdi3,__cmpdi2,__divdi3,__fixdfdi,__fixsfdi,__fixunsdfdi,__fixunssfdi,__floatdidf,__floatdisf,__floatunsdidf,__iordi3,__lshldi3,__lshrdi3,__moddi3,__muldi3,__negdi2,__one_cmpldi2,__qdivrem,__adddi3,__anddi3,__ashldi3,__ashrdi3,__cmpdi2,__divdi3,__qdivrem,__fixdfdi,__fixsfdi,__fixunsdfdi,__fixunssfdi,__floatdidf,__floatdisf,__floatunsdidf,__iordi3,__lshldi3,__lshrdi3,__moddi3,__muldi3,__negdi2,__one_cmpldi2,__subdi3,__ucmpdi2,__udivdi3,__umoddi3,__xordi3,__subdi3,__ucmpdi2,__udivdi3,__umoddi3,__xordi3,__error /Users/asimmons/Development/alchemy-darwin-v0.5a/avm2-libc/lib/avm2-libc.l.bc /Users/asimmons/Development/alchemy-darwin-v0.5a/avm2-libc/lib/avm2-libstdc++.l.bc, lib/test.l.bc 98638.achacks.o
llvm-ld: error: Cannot find linker input 'lib/test.l.bc'
asimmons-mac:test asimmons$ ls -l
total 56
-rw-r--r--  1 asimmons  staff  552 Apr  9 17:46 98638.achacks.o
drwxr-xr-x  3 asimmons  staff  102 Apr  9 17:46 lib
-rw-r--r--  1 asimmons  staff   27 Apr  9 17:45 test1.cpp
-rwxr-xr-x  1 asimmons  staff  536 Apr  9 17:46 test1.o
-rw-r--r--  1 asimmons  staff   26 Apr  9 17:45 test2.cpp
-rwxr-xr-x  1 asimmons  staff  536 Apr  9 17:46 test2.o
-rw-r--r--  1 asimmons  staff   26 Apr  9 17:45 testmain.cpp
-rwxr-xr-x  1 asimmons  staff  552 Apr  9 17:45 testmain.o
asimmons-mac:test asimmons$ ls -l lib/
total 8
-rw-------  1 asimmons  staff  1284 Apr  9 17:46 libtest.a
asimmons-mac:test asimmons$

but the linker errors out because it can’t find lib/test.l.bc. Notice how in the first example, ‘test.l.bc’ was generated alongside libtest.a. But in the second example test.l.bc was not generated. Where did it go?

This is a contrived example, but in the project I’m trying to build with alchemy the make scripts generate libraries in full paths and then refer to them that way. It seems that alchemy’s ‘ar’ tool is broken if you try to generate a library anywhere other than ‘.’.

Has anyone else seen this? Is there a workaround?

fyi, I’ve also posted this question on the Alchemy formus.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:31:16+00:00Added an answer on May 16, 2026 at 4:31 pm

    There seems to be a bug in the ‘ar’ tool, but here’s the workaround.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
In my XML file chapters tag has more chapter tag.i need to display chapters
I am doing a simple coin flipping experiment for class that involves flipping a
I am trying to render a haml file in a javascript response like so:
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.