-
Notifications
You must be signed in to change notification settings - Fork 649
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
Replace readline library, Issue 673 #685
Conversation
Too many unrelated commits. Please develop on top of develop branch. Thanks! |
Oops. I forgot that I had updated my develop branch with the official. Should I redo this? |
Yes, please. Rebase & push --force, or close this PR & submit a new PR. |
a788336
to
81f7f78
Compare
.gitmodules
Outdated
@@ -4,5 +4,5 @@ | |||
ignore = dirty | |||
[submodule "libraries/fc"] | |||
path = libraries/fc | |||
url = https://github.com/bitshares/bitshares-fc.git | |||
url = https://github.com/jmjatlanta/bitshares-fc.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you need modifications to bitshares-fc, please do so in the other repo and not redirect the submodules in general!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have backed this out. It will have to be remembered that this PR must be merged with the related PR for bitshares-fc
@@ -410,7 +410,7 @@ void market_history_plugin::plugin_set_program_options( | |||
) | |||
{ | |||
cli.add_options() | |||
("bucket-size", boost::program_options::value<string>()->default_value("[60,300,900,1800,3600,14400,86400]"), | |||
("bucket-size", boost::program_options::value<string>()->default_value("[15,60,300,3600,86400]"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change unrelated to readline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grrr. Git picked up a change from oxarbitrage. I'm not sure why. It is evidently something that happened when I rebased. I've taken it out.
21e9353
to
9efb656
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update fc version.
cmake is expecting the libraries to already be built, and because they aren't the first time through, they are not including them. I'm working on this now. |
@jmjatlanta looks like the
I'm trying with Ubuntu 16.04 LTS. |
Yes, @abitmore I believe that is related to my comment above. The library wasn't built, and I mistakenly had cmake look for it instead of build it. When it didn't find it, it tried to work without it, which doesn't work well. I am attempting to make it part of the build without requiring changes to the files in the repository. If that doesn't work, we'll have to fork editline. |
Oh, that may explain the tab key issue I mentioned above. But I still think the prompt issue is strange, because the prompt shows fine with the Windows binaries I built without readline, although the Windows one doesn't respond to ctrl+D but the Ubuntu-editline one does. |
I've managed to build editline in Ubuntu and linked with cli_wallet. Will submit a PR soon. However, the behavior is still a bit different (minor issues) in comparison to the old one:
At least it works. |
Submitted a PR to fc repo: bitshares/bitshares-fc#16. Here is patch for this repo:
|
Seems there is a bug:
|
The bug and differences you mention have been fixed by a minor change to bitshares-fc. Take a look at PR bitshares/bitshares-fc#17 |
The patch works fine, although it's still a bit different than the old one. For example,
|
programs/cli_wallet/CMakeLists.txt
Outdated
else (MSVC) | ||
add_library(editline STATIC IMPORTED) | ||
set_target_properties(editline PROPERTIES | ||
IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/libraries/fc/vendor/editline/src/project_editline-build/src/.libs/libeditline.a" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct. Lib file should be "BINARY_DIR" based. I think my patch mentioned in a previous comment in this PR would work better (it didn't handle MSVC though).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I misread your patch several comments above. It is better than what I've done. I'm stealing it.
programs/cli_wallet/CMakeLists.txt
Outdated
if(MSVC) | ||
target_link_libraries( cli_wallet | ||
PRIVATE graphene_app graphene_net graphene_chain graphene_egenesis_brief graphene_utilities graphene_wallet fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't duplicate this line, instead, should make use of PLATFORM_SPECIFIC_LIBS
. E.G.
if ( not MSVC )
list ( APPEND PLATFORM_SPECIFIC_LIBS editline )
...
endif ( not MSVC )
By the way, is it sure that editline doesn't work under Windows? If it would work, we don't need this check at all.
programs/cli_wallet/CMakeLists.txt
Outdated
add_library(editline STATIC IMPORTED) | ||
set_target_properties(editline PROPERTIES | ||
IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/libraries/fc/vendor/editline/src/project_editline-build/src/.libs/libeditline.a" | ||
INTERFACE_INCLUDE_DIRECTORIES "$(CMAKE_SOURCE_DIR}/libraries/fc/vendor/editline/include") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not hard code "fc/vendor/editline" here since the directory structure should be decided by fc. Actually we don't need to specify this parameter here, since cli_wallet doesn't directly include the header files. Again, my patch mentioned above works.
programs/cli_wallet/CMakeLists.txt
Outdated
@@ -9,8 +9,12 @@ if( GPERFTOOLS_FOUND ) | |||
list( APPEND PLATFORM_SPECIFIC_LIBS tcmalloc ) | |||
endif() | |||
|
|||
list(APPEND PLATFORM_SPECIFIC_LIBS editline) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is no longer platform specific lib, so can remove this.
@jmjatlanta update fc revision then I think this can be merged. Thanks a lot! |
@jmjatlanta it seems that we don't need to add |
I have verified that all references to editline can be removed from the CMakeLists.txt file. The wallet compiles fine, and the editline features are included in the executable. It seems the editline library has been included as part of PLATFORM_SPECIFIC_LIBS. I am still trying to understand why and how. |
I think cmake handles library dependencies transitively. libfc requires editline, cli_wallet requires libfc, therefore cli_wallet is linked with libeditline. |
I WAS READY TO GET MY WALLET THEN THE PAGE DISAPPEARED AND I COULD NOT GET IT BACK...
From: Peter Conrad <notifications@github.com>
Sent: Friday, March 09, 2018 10:30 AM
To: bitshares/bitshares-core <bitshares-core@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: Re: [bitshares/bitshares-core] Replace readline library, Issue 673 (#685)
I think cmake handles library dependencies transitively. libfc requires editline, cli_wallet requires libfc, therefore cli_wallet is linked with libeditline.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#685 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AjeX8xU0ciL-HSUi-Fre9swA5_VGQezZks5tcqAVgaJpZM4SMnk4>.
|
@serpac this is not a support forum. Please got to https://bitsharestalk.org and ask for help there. |
* upgrade to latest fc * Removed references to readline library
* upgrade to latest fc * Removed references to readline library
This is the bitshares-core portion of the Issue #673
The related bitshares-fc pull request is at bitshares/bitshares-fc#14
Please note that this is here for peer review. More testing needs to be done, especially on non-Linux platforms.