Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build companion via github actions workflow #860

Open
stoefln opened this issue Jan 31, 2024 · 6 comments
Open

Build companion via github actions workflow #860

stoefln opened this issue Jan 31, 2024 · 6 comments

Comments

@stoefln
Copy link

stoefln commented Jan 31, 2024

Since I didn't manage to build the project locally, has anyone tried to create a github workflow for this?

@flyqie
Copy link

flyqie commented May 7, 2024

Hello, I'm very sorry to bother you.

I saw in other issues that you have successfully compiled this project. Could you please share your compilation process? Thank you so much!

I keep building failing in macOS 13.6.6 (22G630) + xcode 15.2 (15C500b) + intel cpu, I am using ./idb_build.sh idb_companion build build_output from idb_companion_oss_release.py and it seems to return got an error from grpc -swift:

/Users/dev/idb/build/SourcePackages/checkouts/grpc-swift/Sources/GRPC/GRPCServerPipelineConfigurator.swift:121:7: error: mutation of captured var 'logger' in concurrently-executing code
        logger[metadataKey: MetadataKey.h2StreamID] = "\(streamID)"
        ^
/Users/dev/idb/build/SourcePackages/checkouts/grpc-swift/Sources/GRPC/GRPCServerPipelineConfigurator.swift:125:86: error: reference to captured var 'logger' in concurrently-executing code
          let handler = self.makeHTTP2ToRawGRPCHandler(normalizeHeaders: true, logger: logger)

Any help would be greatly appreciated!

@suzukieita
Copy link

I had the same issue, but I could successfully build by

@flyqie
Copy link

flyqie commented May 8, 2024

I had the same issue, but I could successfully build by

Thanks but after adding this I got the following error:

<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/CompanionLib.h"
        ^
/Users/dev/idb/CompanionLib/CompanionLib.h:8:9: note: in file included from /Users/dev/idb/CompanionLib/CompanionLib.h:8:
#import <CompanionLib/FBIDBCommandExecutor.h>
        ^
/Users/dev/idb/CompanionLib/FBIDBCommandExecutor.h:10:9: error: 'FBControlCore/FBControlCore.h' file not found
#import <FBControlCore/FBControlCore.h>
        ^
<unknown>:0: error: could not build Objective-C module 'CompanionLib'

I'm so sorry, I searched a lot for related solutions but it still seems to be there, which is really frustrating.

Update:
Sorry, there are no problems now. The previous problem was caused by me forgetting to install the ios simulator in the new environment.

@flyqie
Copy link

flyqie commented May 9, 2024

Since I didn't manage to build the project locally, has anyone tried to create a github workflow for this?

Not sure if you still need it now.

I have created a github actions workflow that compiles both idb.whl and idb_companion.

https://github.com/flyqie/idb/blob/main/.github/workflows/deploy_packages.yml

@stoefln
Copy link
Author

stoefln commented May 9, 2024

@flyqie can someone enlighten me how to make use of those files? how can I tell my local idb installation to use the updated files?

@flyqie
Copy link

flyqie commented May 9, 2024

@flyqie can someone enlighten me how to make use of those files? how can I tell my local idb installation to use the updated files?

idb finds the location of the idb_companion binary in the following way.

idb/idb/cli/main.py

Lines 120 to 123 in 45666c7

def get_default_companion_path() -> Optional[str]:
if sys.platform != "darwin":
return None
return shutil.which("idb_companion") or "/usr/local/bin/idb_companion"

idb/idb/cli/main.py

Lines 162 to 167 in 45666c7

parser.add_argument(
"--companion-path",
type=str,
default=get_default_companion_path(),
help="The path to the idb companion binary. This is only valid when running on macOS platforms",
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants